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

Unified Diff: src/runtime/runtime-function.cc

Issue 1467473002: Install ConstructNonConstructable as construct stub for non-constructables. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 1 month 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/runtime/runtime-classes.cc ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-function.cc
diff --git a/src/runtime/runtime-function.cc b/src/runtime/runtime-function.cc
index 2df297b1d8d61f79192e82c73af04b008e251ace..4f6238527ca5f88c4e76a8e88fd5122435db81aa 100644
--- a/src/runtime/runtime-function.cc
+++ b/src/runtime/runtime-function.cc
@@ -107,6 +107,8 @@ RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) {
CONVERT_ARG_CHECKED(JSFunction, f, 0);
RUNTIME_ASSERT(f->RemovePrototype());
+ f->shared()->set_construct_stub(
+ *isolate->builtins()->ConstructedNonConstructable());
return isolate->heap()->undefined_value();
}
@@ -395,6 +397,8 @@ RUNTIME_FUNCTION(Runtime_FunctionBindArguments) {
bound_function->shared()->set_optimized_code_map(
isolate->heap()->cleared_optimized_code_map());
bound_function->shared()->set_inferred_name(isolate->heap()->empty_string());
+ bound_function->shared()->set_construct_stub(
+ *isolate->builtins()->JSBuiltinsConstructStub());
// Get all arguments of calling function (Function.prototype.bind).
int argc = 0;
base::SmartArrayPointer<Handle<Object>> arguments =
« no previous file with comments | « src/runtime/runtime-classes.cc ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698