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

Unified Diff: content/renderer/browser_plugin/browser_plugin_browsertest.cc

Issue 12335006: Add handle scopes around executeScriptAndReturnValue callsites (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « content/public/test/render_view_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/browser_plugin/browser_plugin_browsertest.cc
diff --git a/content/renderer/browser_plugin/browser_plugin_browsertest.cc b/content/renderer/browser_plugin/browser_plugin_browsertest.cc
index 35b4a366ef1acb9eb52126448099b0a0a806b91b..5fe4d1381d170d65f72f0b961ff78d89d82ce687 100644
--- a/content/renderer/browser_plugin/browser_plugin_browsertest.cc
+++ b/content/renderer/browser_plugin/browser_plugin_browsertest.cc
@@ -99,6 +99,7 @@ void BrowserPluginTest::TearDown() {
std::string BrowserPluginTest::ExecuteScriptAndReturnString(
const std::string& script) {
+ v8::HandleScope handle_scope;
v8::Handle<v8::Value> value = GetMainFrame()->executeScriptAndReturnValue(
WebKit::WebScriptSource(WebKit::WebString::fromUTF8(script.c_str())));
if (value.IsEmpty() || !value->IsString())
@@ -113,6 +114,7 @@ std::string BrowserPluginTest::ExecuteScriptAndReturnString(
int BrowserPluginTest::ExecuteScriptAndReturnInt(
const std::string& script) {
+ v8::HandleScope handle_scope;
v8::Handle<v8::Value> value = GetMainFrame()->executeScriptAndReturnValue(
WebKit::WebScriptSource(WebKit::WebString::fromUTF8(script.c_str())));
if (value.IsEmpty() || !value->IsInt32())
@@ -125,6 +127,7 @@ int BrowserPluginTest::ExecuteScriptAndReturnInt(
// of the script is stored in |result|
bool BrowserPluginTest::ExecuteScriptAndReturnBool(
const std::string& script, bool* result) {
+ v8::HandleScope handle_scope;
v8::Handle<v8::Value> value = GetMainFrame()->executeScriptAndReturnValue(
WebKit::WebScriptSource(WebKit::WebString::fromUTF8(script.c_str())));
if (value.IsEmpty() || !value->IsBoolean())
« no previous file with comments | « content/public/test/render_view_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698