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

Unified Diff: src/proxy.js

Issue 1096763003: Small polishing changes to the native js. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/macros.py ('k') | src/runtime.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/proxy.js
diff --git a/src/proxy.js b/src/proxy.js
index 9f02705e37acdca5808a4c3f08d23be6ad335d2c..61b5e8fe9db29040591079828b51c69bc97dc669 100644
--- a/src/proxy.js
+++ b/src/proxy.js
@@ -16,6 +16,7 @@ var $proxyEnumerate;
%CheckIsBootstrapping();
+var GlobalFunction = global.Function;
var GlobalObject = global.Object;
// -------------------------------------------------------------------
@@ -48,7 +49,7 @@ function ProxyCreateFunction(handler, callTrap, constructTrap) {
["createFunction", "construct"])
}
return %CreateJSFunctionProxy(
- handler, callTrap, constructTrap, $Function.prototype)
+ handler, callTrap, constructTrap, GlobalFunction.prototype)
}
// -------------------------------------------------------------------
@@ -57,7 +58,7 @@ function ProxyCreateFunction(handler, callTrap, constructTrap) {
function DerivedConstructTrap(callTrap) {
return function() {
var proto = this.prototype
- if (!IS_SPEC_OBJECT(proto)) proto = $Object.prototype
+ if (!IS_SPEC_OBJECT(proto)) proto = GlobalObject.prototype
var obj = { __proto__: proto };
var result = %Apply(callTrap, obj, arguments, 0, %_ArgumentsLength());
return IS_SPEC_OBJECT(result) ? result : obj
« no previous file with comments | « src/macros.py ('k') | src/runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698