Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix function declarations that are invalid in strict mode.

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...
commit 742c94b87e94871f29656e90215efe8c83824391 1 parent c16fffc
johnlenz@google.com authored
View
2  closure/goog/labs/mock/mock.js
@@ -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 {
View
4 closure/goog/net/crossdomainrpc.js
@@ -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;
View
4 closure/goog/proto2/message.js
@@ -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);
View
2  closure/goog/testing/mock.js
@@ -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 &&
View
4 closure/goog/tweak/tweakui.js
@@ -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);
@@ -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;
}
View
4 closure/goog/useragent/adobereader.js
@@ -29,7 +29,7 @@ goog.require('goog.userAgent');
(function() {
var version = '';
if (goog.userAgent.IE) {
- function detectOnIe(classId) {
+ var detectOnIe = function (classId) {
/** @preserveTry */
try {
new ActiveXObject(classId);
@@ -37,7 +37,7 @@ goog.require('goog.userAgent');
} catch (ex) {
return false;
}
- }
+ };
if (detectOnIe('AcroPDF.PDF.1')) {
version = '7';
} else if (detectOnIe('PDF.PdfCtrl.6')) {
Please sign in to comment.
Something went wrong with that request. Please try again.