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

Unified Diff: src/objects.cc

Issue 1407313004: Adds the possibility of setting a Code object as the callback of a FunctionTemplate. (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/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 5c1e9aa653684776f9a1cf4d307b941f8dbacc35..718fd99ae4b63b907e7627fdf4a89f2ab9165f62 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -7765,8 +7765,10 @@ MaybeHandle<Object> JSObject::DefineAccessor(LookupIterator* it,
}
}
- DCHECK(getter->IsCallable() || getter->IsUndefined() || getter->IsNull());
- DCHECK(setter->IsCallable() || setter->IsUndefined() || setter->IsNull());
+ DCHECK(getter->IsCallable() || getter->IsUndefined() || getter->IsNull() ||
+ getter->IsCode());
Benedikt Meurer 2015/11/12 04:31:21 This will be hard to maintain everywhere. AFAIR th
epertoso 2015/11/13 01:39:28 Actually we don't need it, at this point the Funct
+ DCHECK(setter->IsCallable() || setter->IsUndefined() || setter->IsNull() ||
+ setter->IsCode());
// At least one of the accessors needs to be a new value.
DCHECK(!getter->IsNull() || !setter->IsNull());
if (!getter->IsNull()) {

Powered by Google App Engine
This is Rietveld 408576698