Commit 7beb149f authored by neis's avatar neis Committed by Commit bot

[bootstrapper] Remove some redundant calls to set_native.

R=adamk@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2378483002
Cr-Commit-Position: refs/heads/master@{#39797}
parent fa071284
...@@ -1000,13 +1000,10 @@ static void InstallError(Isolate* isolate, Handle<JSObject> global, ...@@ -1000,13 +1000,10 @@ static void InstallError(Isolate* isolate, Handle<JSObject> global,
error_fun->shared()->set_construct_stub( error_fun->shared()->set_construct_stub(
*isolate->builtins()->ErrorConstructor()); *isolate->builtins()->ErrorConstructor());
error_fun->shared()->set_length(1); error_fun->shared()->set_length(1);
error_fun->shared()->set_native(true);
if (context_index == Context::ERROR_FUNCTION_INDEX) { if (context_index == Context::ERROR_FUNCTION_INDEX) {
Handle<JSFunction> capture_stack_trace_fun = SimpleInstallFunction(error_fun, "captureStackTrace",
SimpleInstallFunction(error_fun, "captureStackTrace", Builtins::kErrorCaptureStackTrace, 2, false);
Builtins::kErrorCaptureStackTrace, 2, false);
capture_stack_trace_fun->shared()->set_native(true);
} }
InstallWithIntrinsicDefaultProto(isolate, error_fun, context_index); InstallWithIntrinsicDefaultProto(isolate, error_fun, context_index);
...@@ -1025,7 +1022,6 @@ static void InstallError(Isolate* isolate, Handle<JSObject> global, ...@@ -1025,7 +1022,6 @@ static void InstallError(Isolate* isolate, Handle<JSObject> global,
Handle<JSFunction> to_string_fun = Handle<JSFunction> to_string_fun =
SimpleInstallFunction(prototype, factory->toString_string(), SimpleInstallFunction(prototype, factory->toString_string(),
Builtins::kErrorPrototypeToString, 0, true); Builtins::kErrorPrototypeToString, 0, true);
to_string_fun->shared()->set_native(true);
isolate->native_context()->set_error_to_string(*to_string_fun); isolate->native_context()->set_error_to_string(*to_string_fun);
} else { } else {
DCHECK(context_index != Context::ERROR_FUNCTION_INDEX); DCHECK(context_index != Context::ERROR_FUNCTION_INDEX);
...@@ -2776,8 +2772,6 @@ void Bootstrapper::ExportFromRuntime(Isolate* isolate, ...@@ -2776,8 +2772,6 @@ void Bootstrapper::ExportFromRuntime(Isolate* isolate,
container, "CallSite", JS_OBJECT_TYPE, JSObject::kHeaderSize, container, "CallSite", JS_OBJECT_TYPE, JSObject::kHeaderSize,
isolate->initial_object_prototype(), Builtins::kUnsupportedThrower); isolate->initial_object_prototype(), Builtins::kUnsupportedThrower);
callsite_fun->shared()->DontAdaptArguments(); callsite_fun->shared()->DontAdaptArguments();
callsite_fun->shared()->set_native(true);
isolate->native_context()->set_callsite_function(*callsite_fun); isolate->native_context()->set_callsite_function(*callsite_fun);
{ {
...@@ -2815,8 +2809,7 @@ void Bootstrapper::ExportFromRuntime(Isolate* isolate, ...@@ -2815,8 +2809,7 @@ void Bootstrapper::ExportFromRuntime(Isolate* isolate,
Handle<JSFunction> fun; Handle<JSFunction> fun;
for (const FunctionInfo& info : infos) { for (const FunctionInfo& info : infos) {
fun = SimpleInstallFunction(proto, info.name, info.id, 0, true, attrs); SimpleInstallFunction(proto, info.name, info.id, 0, true, attrs);
fun->shared()->set_native(true);
} }
Accessors::FunctionSetPrototype(callsite_fun, proto).Assert(); Accessors::FunctionSetPrototype(callsite_fun, proto).Assert();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment