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

Unified Diff: src/contexts.cc

Issue 1856203002: [V8] Added DebugEvaluateContext to DCHECKs in contexts.cc (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/contexts.cc
diff --git a/src/contexts.cc b/src/contexts.cc
index 9adccb2897778611d6a89556561218371791175e..642e4741643916950781526fabbe75ebdf9328ef 100644
--- a/src/contexts.cc
+++ b/src/contexts.cc
@@ -90,22 +90,23 @@ Context* Context::closure_context() {
}
JSObject* Context::extension_object() {
- DCHECK(IsNativeContext() || IsFunctionContext() || IsBlockContext());
+ DCHECK(IsNativeContext() || IsFunctionContext() || IsBlockContext() ||
+ IsDebugEvaluateContext());
Yang 2016/04/05 08:28:01 I don't think this can happen. We don't even expec
HeapObject* object = extension();
if (object->IsTheHole()) return nullptr;
if (IsBlockContext()) {
if (!object->IsSloppyBlockWithEvalContextExtension()) return nullptr;
object = SloppyBlockWithEvalContextExtension::cast(object)->extension();
}
- DCHECK(object->IsJSContextExtensionObject() ||
+ DCHECK(object->IsJSContextExtensionObject() || IsDebugEvaluateContext() ||
(IsNativeContext() && object->IsJSGlobalObject()));
return JSObject::cast(object);
}
JSReceiver* Context::extension_receiver() {
- DCHECK(IsNativeContext() || IsWithContext() ||
- IsFunctionContext() || IsBlockContext());
+ DCHECK(IsNativeContext() || IsWithContext() || IsFunctionContext() ||
+ IsBlockContext() || IsDebugEvaluateContext());
Yang 2016/04/05 08:28:01 This should not happen. The only place I can see t
return IsWithContext() ? JSReceiver::cast(extension()) : extension_object();
}
« 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