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

Unified Diff: src/bootstrapper.cc

Issue 2378483002: [bootstrapper] Remove some redundant calls to set_native. (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 6f5dcff189a37235eb57ea0ec26a8d18c136c5c4..305f2b8755c1a670ab5ffb9447494051c717e49b 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1000,13 +1000,10 @@ static void InstallError(Isolate* isolate, Handle<JSObject> global,
error_fun->shared()->set_construct_stub(
*isolate->builtins()->ErrorConstructor());
error_fun->shared()->set_length(1);
- error_fun->shared()->set_native(true);
if (context_index == Context::ERROR_FUNCTION_INDEX) {
- Handle<JSFunction> capture_stack_trace_fun =
- SimpleInstallFunction(error_fun, "captureStackTrace",
- Builtins::kErrorCaptureStackTrace, 2, false);
- capture_stack_trace_fun->shared()->set_native(true);
+ SimpleInstallFunction(error_fun, "captureStackTrace",
+ Builtins::kErrorCaptureStackTrace, 2, false);
}
InstallWithIntrinsicDefaultProto(isolate, error_fun, context_index);
@@ -1025,7 +1022,6 @@ static void InstallError(Isolate* isolate, Handle<JSObject> global,
Handle<JSFunction> to_string_fun =
SimpleInstallFunction(prototype, factory->toString_string(),
Builtins::kErrorPrototypeToString, 0, true);
- to_string_fun->shared()->set_native(true);
isolate->native_context()->set_error_to_string(*to_string_fun);
} else {
DCHECK(context_index != Context::ERROR_FUNCTION_INDEX);
@@ -2776,8 +2772,6 @@ void Bootstrapper::ExportFromRuntime(Isolate* isolate,
container, "CallSite", JS_OBJECT_TYPE, JSObject::kHeaderSize,
isolate->initial_object_prototype(), Builtins::kUnsupportedThrower);
callsite_fun->shared()->DontAdaptArguments();
- callsite_fun->shared()->set_native(true);
-
isolate->native_context()->set_callsite_function(*callsite_fun);
{
@@ -2815,8 +2809,7 @@ void Bootstrapper::ExportFromRuntime(Isolate* isolate,
Handle<JSFunction> fun;
for (const FunctionInfo& info : infos) {
- fun = SimpleInstallFunction(proto, info.name, info.id, 0, true, attrs);
- fun->shared()->set_native(true);
+ SimpleInstallFunction(proto, info.name, info.id, 0, true, attrs);
}
Accessors::FunctionSetPrototype(callsite_fun, proto).Assert();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698