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

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

Issue 1467473002: Install ConstructNonConstructable as construct stub for non-constructables. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
Index: src/runtime/runtime-object.cc
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index c20f7a0d5cdc56851a85f67e0b65641bd4cdf17a..5140210765e42f7b1de31f9d5d27e96bfc8f6913 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -1042,11 +1042,7 @@ RUNTIME_FUNCTION(Runtime_NewObject) {
CONVERT_ARG_HANDLE_CHECKED(JSFunction, constructor, 0);
CONVERT_ARG_HANDLE_CHECKED(JSReceiver, new_target, 1);
- // TODO(verwaest): Make sure |constructor| is guaranteed to be a constructor.
- if (!constructor->IsConstructor()) {
- THROW_NEW_ERROR_RETURN_FAILURE(
- isolate, NewTypeError(MessageTemplate::kNotConstructor, constructor));
- }
+ DCHECK(constructor->IsConstructor());
// If called through new, new.target can be:
// - a subclass of constructor,
« src/builtins.h ('K') | « src/runtime/runtime-internal.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698