Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: Source/core/inspector/InjectedScriptCanvasModuleSource.js

Issue 332173004: DevTools: [ClosureCompiler] Fix injected script errors on a newer compiler (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/devtools/scripts/compile_frontend.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 11 matching lines...) Expand all
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 /** 31 /**
32 * FIXME: ES5 strict mode check is suppressed due to multiple uses of arguments. callee.
33 * @fileoverview
34 * @suppress {es5Strict}
35 */
36
37 /**
32 * @param {InjectedScriptHostClass} InjectedScriptHost 38 * @param {InjectedScriptHostClass} InjectedScriptHost
33 * @param {Window} inspectedWindow 39 * @param {Window} inspectedWindow
34 * @param {number} injectedScriptId 40 * @param {number} injectedScriptId
35 * @param {!InjectedScript} injectedScript 41 * @param {!InjectedScript} injectedScript
36 */ 42 */
37 (function (InjectedScriptHost, inspectedWindow, injectedScriptId, injectedScript ) { 43 (function (InjectedScriptHost, inspectedWindow, injectedScriptId, injectedScript ) {
38 44
39 var TypeUtils = { 45 var TypeUtils = {
40 /** 46 /**
41 * http://www.khronos.org/registry/typedarray/specs/latest/#7 47 * http://www.khronos.org/registry/typedarray/specs/latest/#7
(...skipping 3906 matching lines...) Expand 10 before | Expand all | Expand 10 after
3948 3954
3949 var gl = this._createUninstrumentedWebGLRenderingContext(); 3955 var gl = this._createUninstrumentedWebGLRenderingContext();
3950 iterateWebGLEnums.call(this, gl); 3956 iterateWebGLEnums.call(this, gl);
3951 3957
3952 var extensions = gl.getSupportedExtensions() || []; 3958 var extensions = gl.getSupportedExtensions() || [];
3953 for (var i = 0, n = extensions.length; i < n; ++i) 3959 for (var i = 0, n = extensions.length; i < n; ++i)
3954 iterateWebGLEnums.call(this, gl.getExtension(extensions[i])); 3960 iterateWebGLEnums.call(this, gl.getExtension(extensions[i]));
3955 3961
3956 // Sort to get rid of ambiguity. 3962 // Sort to get rid of ambiguity.
3957 for (var value in this._enumValueToNames) { 3963 for (var value in this._enumValueToNames) {
3958 var names = this._enumValueToNames[value]; 3964 var numericValue = Number(value);
3965 var names = this._enumValueToNames[numericValue];
3959 if (names.length > 1) { 3966 if (names.length > 1) {
3960 // Choose one enum name if possible. For example: 3967 // Choose one enum name if possible. For example:
3961 // [BLEND_EQUATION, BLEND_EQUATION_RGB] => BLEND_EQUATION 3968 // [BLEND_EQUATION, BLEND_EQUATION_RGB] => BLEND_EQUATION
3962 // [COLOR_ATTACHMENT0, COLOR_ATTACHMENT0_WEBGL] => COLOR_ATTAC HMENT0 3969 // [COLOR_ATTACHMENT0, COLOR_ATTACHMENT0_WEBGL] => COLOR_ATTAC HMENT0
3963 var common = commonSubstring(names); 3970 var common = commonSubstring(names);
3964 if (common) 3971 if (common)
3965 this._enumValueToNames[value] = [common]; 3972 this._enumValueToNames[numericValue] = [common];
3966 else 3973 else
3967 this._enumValueToNames[value] = names.sort(); 3974 this._enumValueToNames[numericValue] = names.sort();
3968 } 3975 }
3969 } 3976 }
3970 }, 3977 },
3971 3978
3972 /** 3979 /**
3973 * @return {?WebGLRenderingContext} 3980 * @return {?WebGLRenderingContext}
3974 */ 3981 */
3975 _createUninstrumentedWebGLRenderingContext: function() 3982 _createUninstrumentedWebGLRenderingContext: function()
3976 { 3983 {
3977 var canvas = /** @type {!HTMLCanvasElement} */ (inspectedWindow.document .createElement("canvas")); 3984 var canvas = /** @type {!HTMLCanvasElement} */ (inspectedWindow.document .createElement("canvas"));
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
4575 _parseStringId: function(stringId) 4582 _parseStringId: function(stringId)
4576 { 4583 {
4577 return InjectedScriptHost.evaluate("(" + stringId + ")"); 4584 return InjectedScriptHost.evaluate("(" + stringId + ")");
4578 } 4585 }
4579 } 4586 }
4580 4587
4581 var injectedCanvasModule = new InjectedCanvasModule(); 4588 var injectedCanvasModule = new InjectedCanvasModule();
4582 return injectedCanvasModule; 4589 return injectedCanvasModule;
4583 4590
4584 }) 4591 })
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/scripts/compile_frontend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698