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

Unified Diff: Source/bindings/v8/CustomElementWrapper.cpp

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 | « no previous file | Source/bindings/v8/V8DOMWrapper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/CustomElementWrapper.cpp
diff --git a/Source/bindings/v8/CustomElementWrapper.cpp b/Source/bindings/v8/CustomElementWrapper.cpp
index 081bca130a41dcaf998a6cb577bf71c8d0084484..46d679a5ce8f6b3ce82e9b9c1c9b9ea8620688fb 100644
--- a/Source/bindings/v8/CustomElementWrapper.cpp
+++ b/Source/bindings/v8/CustomElementWrapper.cpp
@@ -90,10 +90,8 @@ v8::Handle<v8::Object> CustomElementWrapper<ElementType, WrapperType>::wrap(Pass
{
ASSERT(DOMDataStore::getWrapper<V8Element>(element.get(), isolate).IsEmpty());
- // FIXME: creationContext.IsEmpty() should never happen. Remove
- // this when callers (like InspectorController::inspect) are fixed
- // to never pass an empty creation context.
- v8::Handle<v8::Context> context = creationContext.IsEmpty() ? isolate->GetCurrentContext() : creationContext->CreationContext();
+ ASSERT(!creationContext.IsEmpty());
+ v8::Handle<v8::Context> context = creationContext->CreationContext();
if (!element->isUpgradedCustomElement() || DOMWrapperWorld::world(context).isIsolatedWorld())
return createUpgradeCandidateWrapper(element.get(), creationContext, isolate, createSpecificWrapper);
« no previous file with comments | « no previous file | Source/bindings/v8/V8DOMWrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698