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

Unified Diff: Source/bindings/tests/results/V8TestObj.h

Issue 14348032: Perfrorm binding integrity check using scriptwrappable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 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
Index: Source/bindings/tests/results/V8TestObj.h
diff --git a/Source/bindings/tests/results/V8TestObj.h b/Source/bindings/tests/results/V8TestObj.h
index dfc44e5a161ad7ac457e7740cb61ccefe7a9eaaf..e040a7f9992ea73661f49a85360cbe9f36bc90e8 100644
--- a/Source/bindings/tests/results/V8TestObj.h
+++ b/Source/bindings/tests/results/V8TestObj.h
@@ -68,6 +68,11 @@ inline v8::Handle<v8::Object> wrap(TestObj* impl, v8::Handle<v8::Object> creatio
{
ASSERT(impl);
ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty());
+ if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) {
+ const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObject(impl);
+ if (actualInfo != &V8TestObj::info)
+ CRASH();
+ }
return V8TestObj::createWrapper(impl, creationContext, isolate);
}

Powered by Google App Engine
This is Rietveld 408576698