Skip to content

Commit eed0773

Browse files
committed
Merge pull request mozilla#722 from kkujala/master
Name a few anonymous functions.
2 parents ea7e9aa + 8a5516c commit eed0773

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/pattern.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Shadings.RadialAxial = (function radialAxialShading() {
9797
this.colorStops = colorStops;
9898
}
9999

100-
constructor.fromIR = function(ctx, raw) {
100+
constructor.fromIR = function radialAxialShadingGetIR(ctx, raw) {
101101
var type = raw[1];
102102
var colorStops = raw[2];
103103
var p0 = raw[3];
@@ -129,7 +129,7 @@ Shadings.RadialAxial = (function radialAxialShading() {
129129
}
130130

131131
constructor.prototype = {
132-
getIR: function RadialAxialShading_getIR() {
132+
getIR: function radialAxialShadingGetIR() {
133133
var coordsArr = this.coordsArr;
134134
var type = this.shadingType;
135135
if (type == 2) {
@@ -164,12 +164,12 @@ Shadings.Dummy = (function dummyShading() {
164164
this.type = 'Pattern';
165165
}
166166

167-
constructor.fromIR = function() {
167+
constructor.fromIR = function dummyShadingFromIR() {
168168
return 'hotpink';
169169
}
170170

171171
constructor.prototype = {
172-
getIR: function dummpy_getir() {
172+
getIR: function dummyShadingGetIR() {
173173
return ['Dummy'];
174174
}
175175
};

src/stream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ var JpegStream = (function jpegStream() {
801801
}
802802

803803
constructor.prototype = {
804-
getIR: function() {
804+
getIR: function jpegStreamGetIR() {
805805
return this.src;
806806
},
807807
getChar: function jpegStreamGetChar() {

src/util.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ function isPDFFunction(v) {
197197
* can be set. If any of these happens twice or the data is required before
198198
* it was set, an exception is throw.
199199
*/
200-
var Promise = (function() {
200+
var Promise = (function promise() {
201201
var EMPTY_PROMISE = {};
202202

203203
/**
@@ -244,15 +244,15 @@ var Promise = (function() {
244244
return this._data;
245245
},
246246

247-
onData: function(callback) {
247+
onData: function promiseOnData(callback) {
248248
if (this._data !== EMPTY_PROMISE) {
249249
callback(this._data);
250250
} else {
251251
this.onDataCallback = callback;
252252
}
253253
},
254254

255-
resolve: function(data) {
255+
resolve: function promiseResolve(data) {
256256
if (this.isResolved) {
257257
throw 'A Promise can be resolved only once ' + this.name;
258258
}
@@ -266,7 +266,7 @@ var Promise = (function() {
266266
}
267267
},
268268

269-
then: function(callback) {
269+
then: function promiseThen(callback) {
270270
if (!callback) {
271271
throw 'Requiring callback' + this.name;
272272
}

0 commit comments

Comments
 (0)