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

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 comment 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
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 * @fileoverview
33 * @suppress {es5Strict}
aandrey 2014/06/17 11:38:33 a comment of FIXME why suppressing
apavlov 2014/06/17 11:54:04 Done.
34 */
35
36 /**
32 * @param {InjectedScriptHostClass} InjectedScriptHost 37 * @param {InjectedScriptHostClass} InjectedScriptHost
33 * @param {Window} inspectedWindow 38 * @param {Window} inspectedWindow
34 * @param {number} injectedScriptId 39 * @param {number} injectedScriptId
35 * @param {!InjectedScript} injectedScript 40 * @param {!InjectedScript} injectedScript
36 */ 41 */
37 (function (InjectedScriptHost, inspectedWindow, injectedScriptId, injectedScript ) { 42 (function (InjectedScriptHost, inspectedWindow, injectedScriptId, injectedScript ) {
38 43
39 var TypeUtils = { 44 var TypeUtils = {
40 /** 45 /**
41 * http://www.khronos.org/registry/typedarray/specs/latest/#7 46 * http://www.khronos.org/registry/typedarray/specs/latest/#7
(...skipping 3906 matching lines...) Expand 10 before | Expand all | Expand 10 after
3948 3953
3949 var gl = this._createUninstrumentedWebGLRenderingContext(); 3954 var gl = this._createUninstrumentedWebGLRenderingContext();
3950 iterateWebGLEnums.call(this, gl); 3955 iterateWebGLEnums.call(this, gl);
3951 3956
3952 var extensions = gl.getSupportedExtensions() || []; 3957 var extensions = gl.getSupportedExtensions() || [];
3953 for (var i = 0, n = extensions.length; i < n; ++i) 3958 for (var i = 0, n = extensions.length; i < n; ++i)
3954 iterateWebGLEnums.call(this, gl.getExtension(extensions[i])); 3959 iterateWebGLEnums.call(this, gl.getExtension(extensions[i]));
3955 3960
3956 // Sort to get rid of ambiguity. 3961 // Sort to get rid of ambiguity.
3957 for (var value in this._enumValueToNames) { 3962 for (var value in this._enumValueToNames) {
3958 var names = this._enumValueToNames[value]; 3963 var numericValue = Number(value);
3964 var names = this._enumValueToNames[numericValue];
3959 if (names.length > 1) { 3965 if (names.length > 1) {
3960 // Choose one enum name if possible. For example: 3966 // Choose one enum name if possible. For example:
3961 // [BLEND_EQUATION, BLEND_EQUATION_RGB] => BLEND_EQUATION 3967 // [BLEND_EQUATION, BLEND_EQUATION_RGB] => BLEND_EQUATION
3962 // [COLOR_ATTACHMENT0, COLOR_ATTACHMENT0_WEBGL] => COLOR_ATTAC HMENT0 3968 // [COLOR_ATTACHMENT0, COLOR_ATTACHMENT0_WEBGL] => COLOR_ATTAC HMENT0
3963 var common = commonSubstring(names); 3969 var common = commonSubstring(names);
3964 if (common) 3970 if (common)
3965 this._enumValueToNames[value] = [common]; 3971 this._enumValueToNames[numericValue] = [common];
3966 else 3972 else
3967 this._enumValueToNames[value] = names.sort(); 3973 this._enumValueToNames[numericValue] = names.sort();
3968 } 3974 }
3969 } 3975 }
3970 }, 3976 },
3971 3977
3972 /** 3978 /**
3973 * @return {?WebGLRenderingContext} 3979 * @return {?WebGLRenderingContext}
3974 */ 3980 */
3975 _createUninstrumentedWebGLRenderingContext: function() 3981 _createUninstrumentedWebGLRenderingContext: function()
3976 { 3982 {
3977 var canvas = /** @type {!HTMLCanvasElement} */ (inspectedWindow.document .createElement("canvas")); 3983 var canvas = /** @type {!HTMLCanvasElement} */ (inspectedWindow.document .createElement("canvas"));
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
4575 _parseStringId: function(stringId) 4581 _parseStringId: function(stringId)
4576 { 4582 {
4577 return InjectedScriptHost.evaluate("(" + stringId + ")"); 4583 return InjectedScriptHost.evaluate("(" + stringId + ")");
4578 } 4584 }
4579 } 4585 }
4580 4586
4581 var injectedCanvasModule = new InjectedCanvasModule(); 4587 var injectedCanvasModule = new InjectedCanvasModule();
4582 return injectedCanvasModule; 4588 return injectedCanvasModule;
4583 4589
4584 }) 4590 })
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/scripts/compile_frontend.py » ('j') | Source/devtools/scripts/compile_frontend.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698