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

Unified Diff: chrome/renderer/extensions/object_backed_native_handler.h

Issue 12378077: Attempting to fix problems in 11571014. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: oops Created 7 years, 10 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: chrome/renderer/extensions/object_backed_native_handler.h
diff --git a/chrome/renderer/extensions/object_backed_native_handler.h b/chrome/renderer/extensions/object_backed_native_handler.h
index 8c7e65859150188457e6970a5566aee3e30ab567..af7671b0774511b99426372bc7007d6fa2bc36f9 100644
--- a/chrome/renderer/extensions/object_backed_native_handler.h
+++ b/chrome/renderer/extensions/object_backed_native_handler.h
@@ -41,26 +41,20 @@ class ObjectBackedNativeHandler : public NativeHandler {
void RouteStaticFunction(const std::string& name,
const HandlerFunc handler_func);
- // Invalidate this object so it cannot be used any more. This is needed
- // because it's possible for this to outlive |v8_context_|. Invalidate must
- // be called before this happens.
- //
- // Subclasses may override to invalidate their own V8 state, but always
- // call superclass eventually.
- //
- // This must be idempotent. Returns true if it was the first time this was
- // called, false otherwise.
- virtual bool Invalidate();
-
v8::Handle<v8::Context> v8_context() { return v8_context_; }
+ virtual void Invalidate() OVERRIDE;
+
private:
+
static v8::Handle<v8::Value> Router(const v8::Arguments& args);
- std::vector<linked_ptr<HandlerFunction> > handler_functions_;
+ struct RouterData;
+ std::vector<linked_ptr<RouterData> > router_data_;
+
v8::Handle<v8::Context> v8_context_;
+
v8::Persistent<v8::ObjectTemplate> object_template_;
- bool is_valid_;
DISALLOW_COPY_AND_ASSIGN(ObjectBackedNativeHandler);
};
« no previous file with comments | « chrome/renderer/extensions/native_handler.cc ('k') | chrome/renderer/extensions/object_backed_native_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698