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

Unified Diff: src/factory.cc

Issue 1294583006: Clean up native context slots and add new ones. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/factory.h ('k') | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 43c0f8aac780d007b07a076a906458f8fa3aaefc..de47c849480634bb8560a5289cf5e5f2cdd46ecd 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1250,18 +1250,15 @@ Handle<Object> Factory::NewError(const char* maker, const char* message,
}
-Handle<Object> Factory::NewError(const char* constructor,
+Handle<Object> Factory::NewError(Handle<JSFunction> constructor,
Handle<String> message) {
- Handle<String> constr = InternalizeUtf8String(constructor);
- Handle<JSFunction> fun = Handle<JSFunction>::cast(Object::GetProperty(
- isolate()->js_builtins_object(), constr).ToHandleChecked());
Handle<Object> argv[] = { message };
// Invoke the JavaScript factory method. If an exception is thrown while
// running the factory method, use the exception as the result.
Handle<Object> result;
MaybeHandle<Object> exception;
- if (!Execution::TryCall(fun, undefined_value(), arraysize(argv), argv,
+ if (!Execution::TryCall(constructor, undefined_value(), arraysize(argv), argv,
&exception)
.ToHandle(&result)) {
Handle<Object> exception_obj;
« no previous file with comments | « src/factory.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698