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

Unified Diff: Source/bindings/v8/V8DOMWrapper.h

Issue 315043007: Add RELEASE_ASSERT for ensuring that we have no empty context to V8WrapperInstantiationScope. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 6 years, 6 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 | « Source/bindings/v8/CustomElementWrapper.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8DOMWrapper.h
diff --git a/Source/bindings/v8/V8DOMWrapper.h b/Source/bindings/v8/V8DOMWrapper.h
index a8aee01666cb3a2aaf11d2b7788d709f6c43ce74..db41c8f90348dac4e3ea562f20334195f38a2b3e 100644
--- a/Source/bindings/v8/V8DOMWrapper.h
+++ b/Source/bindings/v8/V8DOMWrapper.h
@@ -148,11 +148,10 @@ struct WrapperTypeInfo;
: m_didEnterContext(false)
, m_context(isolate->GetCurrentContext())
{
- // FIXME: Remove all empty creationContexts from caller sites.
- // If a creationContext is empty, we will end up creating a new object
- // in the context currently entered. This is wrong.
- if (creationContext.IsEmpty())
- return;
+ // creationContext should not be empty. Because if we have an
+ // empty creationContext, we will end up creating
+ // a new object in the context currently entered. This is wrong.
+ RELEASE_ASSERT(!creationContext.IsEmpty());
v8::Handle<v8::Context> contextForWrapper = creationContext->CreationContext();
// For performance, we enter the context only if the currently running context
// is different from the context that we are about to enter.
« no previous file with comments | « Source/bindings/v8/CustomElementWrapper.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698