Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
Fix function declarations that are invalid in strict mode.
Browse files Browse the repository at this point in the history
R=nicksantos
DELTA=10 (0 added, 0 deleted, 10 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=6033


git-svn-id: http://closure-library.googlecode.com/svn/trunk@2399 0b95b8e8-c90f-11de-9d4f-f947ee5921c8
  • Loading branch information
johnlenz@google.com committed Dec 19, 2012
1 parent c16fffc commit 742c94b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion closure/goog/labs/mock/mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ goog.labs.mock.MockObjectManager_ = function(objOrClass) {
// Create a temporary subclass with a no-op constructor so that we can
// create an instance and determine what methods it has.
/** @constructor */
function tempCtor() {};
var tempCtor = function() {};
goog.inherits(tempCtor, objOrClass);
obj = new tempCtor();
} else {
Expand Down
4 changes: 2 additions & 2 deletions closure/goog/net/crossdomainrpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -740,12 +740,12 @@ goog.net.CrossDomainRpc.sendResponse =
dummyUri, numChunksToSend, isDataJson, status, headers);
} else {
var numChunksSent = 0;
function checkToCreateResponseInfo_() {
var checkToCreateResponseInfo_ = function() {
if (++numChunksSent == numChunksToSend) {
goog.net.CrossDomainRpc.createResponseInfo_(
dummyUri, numChunksToSend, isDataJson, status, headers);
}
}
};

for (var i = 0; i < numChunksToSend; i++) {
var chunkStart = i * chunkSize;
Expand Down
4 changes: 2 additions & 2 deletions closure/goog/proto2/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,9 @@ goog.proto2.Message.prototype.equals = function(other) {
if (this.has(field)) {
var isComposite = field.isCompositeType();

function fieldsEqual(value1, value2) {
var fieldsEqual = function(value1, value2) {
return isComposite ? value1.equals(value2) : value1 == value2;
}
};

var thisValue = this.getValueForField_(field);
var otherValue = other.getValueForField_(field);
Expand Down
2 changes: 1 addition & 1 deletion closure/goog/testing/mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ goog.testing.Mock = function(objectToMock, opt_mockStaticMethods,
if (opt_createProxy && !opt_mockStaticMethods &&
goog.isFunction(objectToMock)) {
/** @constructor */
function tempCtor() {};
var tempCtor = function () {};
goog.inherits(tempCtor, objectToMock);
this.$proxy = new tempCtor();
} else if (opt_createProxy && opt_mockStaticMethods &&
Expand Down
4 changes: 2 additions & 2 deletions closure/goog/tweak/tweakui.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ goog.tweak.TweakUi.createCollapsible = function(opt_domHelper) {
var hideLink = dh.createDom('a', {href: 'javascript:;'}, 'Hide Tweaks');
var ret = dh.createDom('div', null, showLink);

function lazyCreate() {
var lazyCreate = function() {
// Lazily render the UI.
var ui = new goog.tweak.TweakUi(
/** @type {!goog.tweak.Registry} */ (registry), dh);
Expand All @@ -178,7 +178,7 @@ goog.tweak.TweakUi.createCollapsible = function(opt_domHelper) {
tweakElem.insertBefore(hideLink, tweakElem.firstChild);
ret.appendChild(tweakElem);
return tweakElem;
}
};
new goog.ui.Zippy(showLink, lazyCreate, false /* expanded */, hideLink);
return ret;
}
Expand Down
4 changes: 2 additions & 2 deletions closure/goog/useragent/adobereader.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ goog.require('goog.userAgent');
(function() {
var version = '';
if (goog.userAgent.IE) {
function detectOnIe(classId) {
var detectOnIe = function (classId) {
/** @preserveTry */
try {
new ActiveXObject(classId);
return true;
} catch (ex) {
return false;
}
}
};
if (detectOnIe('AcroPDF.PDF.1')) {
version = '7';
} else if (detectOnIe('PDF.PdfCtrl.6')) {
Expand Down

0 comments on commit 742c94b

Please sign in to comment.