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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.js

Issue 2574523004: Don't touch the prototype chain to get the private script controller. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 "use strict"; 5 "use strict";
6 6
7 function PrivateScriptController() 7 function PrivateScriptController()
8 { 8 {
9 this._installedClasses = {}; 9 this._installedClasses = {};
10 this._DOMException = {}; 10 this._DOMException = {};
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 } 132 }
133 133
134 var exception = new PrivateScriptException(); 134 var exception = new PrivateScriptException();
135 exception.code = code; 135 exception.code = code;
136 exception.message = message; 136 exception.message = message;
137 exception.name = "PrivateScriptException"; 137 exception.name = "PrivateScriptException";
138 throw exception; 138 throw exception;
139 }, 139 },
140 } 140 }
141 141
142 if (typeof window.privateScriptController === 'undefined') 142 if (!window.hasOwnProperty("privateScriptController"))
143 window.privateScriptController = new PrivateScriptController(); 143 window.privateScriptController = new PrivateScriptController();
144 144
145 // This line must be the last statement of this JS file. 145 // This line must be the last statement of this JS file.
146 // A parenthesis is needed, because the caller of this script (PrivateScriptRunn er.cpp) 146 // A parenthesis is needed, because the caller of this script (PrivateScriptRunn er.cpp)
147 // is depending on the completion value of this script. 147 // is depending on the completion value of this script.
148 (privateScriptController.installedClasses); 148 (privateScriptController.installedClasses);
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698