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

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

Issue 588083002: Use the correct v8 context for conversions when calling into the plugin from JS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 dba90aa780a8be427c47900f42ab5af304a4e9a3..4b46fdbd9cab6a1ea09e614ea4593a267100ae88 100644
--- a/content/renderer/pepper/pepper_try_catch.h
+++ b/content/renderer/pepper/pepper_try_catch.h
@@ -25,8 +25,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.
@@ -57,6 +57,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_;
@@ -77,6 +78,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