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

Unified Diff: gin/wrappable.cc

Issue 103703002: Gin: Add support for binding JS methods to C++ instance methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blah Created 7 years 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: gin/wrappable.cc
diff --git a/gin/wrappable.cc b/gin/wrappable.cc
index 5c7c629b7e4e50fd264255db70269af4ab82c582..641a8d657bdd3bbb34e1b63ade19a7732c9e78c8 100644
--- a/gin/wrappable.cc
+++ b/gin/wrappable.cc
@@ -34,7 +34,7 @@ v8::Handle<v8::Object> Wrappable::CreateWrapper(v8::Isolate* isolate) {
PerIsolateData* data = PerIsolateData::From(isolate);
v8::Local<v8::ObjectTemplate> templ = data->GetObjectTemplate(info);
CHECK(!templ.IsEmpty()); // Don't forget to register an object template.
- CHECK(templ->InternalFieldCount() == kNumberOfInternalFields);
+ CHECK_EQ(kNumberOfInternalFields, templ->InternalFieldCount());
Aaron Boodman 2013/12/04 07:05:29 So that the mismatch is printed in the logs if thi
abarth-chromium 2013/12/04 16:27:55 Thanks for fixing these. My Chromium idioms are a
v8::Handle<v8::Object> wrapper = templ->NewInstance();
wrapper->SetAlignedPointerInInternalField(kWrapperInfoIndex, info);
wrapper->SetAlignedPointerInInternalField(kEncodedValueIndex, this);

Powered by Google App Engine
This is Rietveld 408576698