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

Unified Diff: src/proxy.js

Issue 1118273004: Migrate error messages, part 8. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/promise.js ('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 44939f6920d920c16a55433342660eabc0b0c86b..b2be6d2076fd2c3d310e60ef32e576da9810c693 100644
--- a/src/proxy.js
+++ b/src/proxy.js
@@ -23,19 +23,19 @@ var GlobalObject = global.Object;
function ProxyCreate(handler, proto) {
if (!IS_SPEC_OBJECT(handler))
- throw MakeTypeError("handler_non_object", ["create"])
+ throw MakeTypeError(kProxyHandlerNonObject, "create")
if (IS_UNDEFINED(proto))
proto = null
else if (!(IS_SPEC_OBJECT(proto) || IS_NULL(proto)))
- throw MakeTypeError("proto_non_object", ["create"])
+ throw MakeTypeError(kProxyProtoNonObject)
return %CreateJSProxy(handler, proto)
}
function ProxyCreateFunction(handler, callTrap, constructTrap) {
if (!IS_SPEC_OBJECT(handler))
- throw MakeTypeError("handler_non_object", ["create"])
+ throw MakeTypeError(kProxyHandlerNonObject, "createFunction")
if (!IS_SPEC_FUNCTION(callTrap))
- throw MakeTypeError("trap_function_expected", ["createFunction", "call"])
+ throw MakeTypeError(kProxyTrapFunctionExpected, "call")
if (IS_UNDEFINED(constructTrap)) {
constructTrap = DerivedConstructTrap(callTrap)
} else if (IS_SPEC_FUNCTION(constructTrap)) {
@@ -45,8 +45,7 @@ function ProxyCreateFunction(handler, callTrap, constructTrap) {
return %Apply(construct, UNDEFINED, arguments, 0, %_ArgumentsLength());
}
} else {
- throw MakeTypeError("trap_function_expected",
- ["createFunction", "construct"])
+ throw MakeTypeError(kProxyTrapFunctionExpected, "construct")
}
return %CreateJSFunctionProxy(
handler, callTrap, constructTrap, GlobalFunction.prototype)
« no previous file with comments | « src/promise.js ('k') | src/runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698