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

Unified Diff: content/renderer/pepper/pepper_try_catch.h

Issue 614223004: Use the correct v8 context for conversions when calling into the plugin from JS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2171
Patch Set: Created 6 years, 3 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 | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | content/renderer/pepper/pepper_try_catch.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_try_catch.h
diff --git a/content/renderer/pepper/pepper_try_catch.h b/content/renderer/pepper/pepper_try_catch.h
index 819d26926e33ec9cf932e909b7440bbbab2c4f14..382c378166f985eb88853e66263f965f4d5de848 100644
--- a/content/renderer/pepper/pepper_try_catch.h
+++ b/content/renderer/pepper/pepper_try_catch.h
@@ -27,8 +27,8 @@ class CONTENT_EXPORT PepperTryCatch {
virtual void SetException(const char* message) = 0;
virtual bool HasException() = 0;
- // Gets the plugin context. Virtual so it can be overriden for testing.
- virtual v8::Handle<v8::Context> GetContext();
+ // Gets the context to execute scripts in.
+ virtual v8::Handle<v8::Context> GetContext() = 0;
// Convenience functions for doing conversions to/from V8 values and sets an
// exception if there is an error in the conversion.
@@ -66,6 +66,7 @@ class PepperTryCatchV8 : public PepperTryCatch {
// PepperTryCatch
virtual void SetException(const char* message) OVERRIDE;
virtual bool HasException() OVERRIDE;
+ virtual v8::Handle<v8::Context> GetContext() OVERRIDE;
private:
PP_Var exception_;
@@ -86,6 +87,7 @@ class PepperTryCatchVar : public PepperTryCatch {
// PepperTryCatch
virtual void SetException(const char* message) OVERRIDE;
virtual bool HasException() OVERRIDE;
+ virtual v8::Handle<v8::Context> GetContext() OVERRIDE;
private:
// Code which uses PepperTryCatchVar doesn't typically have a HandleScope,
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | content/renderer/pepper/pepper_try_catch.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698