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

Unified Diff: gin/handle.h

Issue 111083005: Beginning of JS Mojo API to GL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make windows link? 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
« no previous file with comments | « gin/arguments.cc ('k') | mojo/apps/js/bindings/gl/context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/handle.h
diff --git a/gin/handle.h b/gin/handle.h
index 7178bb3793c1f09c930481d7b55ea6ede4c047bc..da1de347f230a53080ae41b048d9885865881318 100644
--- a/gin/handle.h
+++ b/gin/handle.h
@@ -31,7 +31,7 @@ class Handle {
}
T* operator->() const { return object_; }
- v8::Handle<v8::Value> ToV8() { return wrapper_; }
+ v8::Handle<v8::Value> ToV8() const { return wrapper_; }
T* get() const { return object_; }
private:
@@ -48,8 +48,11 @@ struct Converter<gin::Handle<T> > {
static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val,
gin::Handle<T>* out) {
T* object = NULL;
- Converter<T*>::FromV8(isolate, val, &object);
- return gin::Handle<T>(val, object);
+ if (!Converter<T*>::FromV8(isolate, val, &object)) {
+ return false;
+ }
+ *out = gin::Handle<T>(val, object);
+ return true;
}
};
« no previous file with comments | « gin/arguments.cc ('k') | mojo/apps/js/bindings/gl/context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698