summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorsvenpanne@chromium.org <svenpanne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-12 19:17:20 +0000
committersvenpanne@chromium.org <svenpanne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-12 19:17:20 +0000
commit1f3fff4f08c8d144879ced1a2cfaf81a8c7aa9c1 (patch)
tree70992accfe6e8ef09972f00048b1fa347bcf1c4b /content
parent9a72e1ac8622359cadcbf1405079271ae6df0057 (diff)
downloadchromium_src-1f3fff4f08c8d144879ced1a2cfaf81a8c7aa9c1.zip
chromium_src-1f3fff4f08c8d144879ced1a2cfaf81a8c7aa9c1.tar.gz
chromium_src-1f3fff4f08c8d144879ced1a2cfaf81a8c7aa9c1.tar.bz2
Use non-deprecated versions of v8::Persistent::New/Dispose.
BUG=v8::2487 Review URL: https://chromiumcodereview.appspot.com/12210035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181970 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/renderer/gpu/gpu_benchmarking_extension.cc22
-rw-r--r--content/renderer/v8_value_converter_impl_unittest.cc2
2 files changed, 15 insertions, 9 deletions
diff --git a/content/renderer/gpu/gpu_benchmarking_extension.cc b/content/renderer/gpu/gpu_benchmarking_extension.cc
index cdfc2a0..f350151 100644
--- a/content/renderer/gpu/gpu_benchmarking_extension.cc
+++ b/content/renderer/gpu/gpu_benchmarking_extension.cc
@@ -247,8 +247,9 @@ class GpuBenchmarkingWrapper : public v8::Extension {
0,
NULL);
}
- callback.Dispose();
- context.Dispose();
+ v8::Isolate* isolate = context->GetIsolate();
+ callback.Dispose(isolate);
+ context.Dispose(isolate);
}
static v8::Handle<v8::Value> BeginSmoothScroll(const v8::Arguments& args) {
@@ -275,10 +276,12 @@ class GpuBenchmarkingWrapper : public v8::Extension {
bool scroll_down = args[0]->BooleanValue();
v8::Local<v8::Function> callback_local =
v8::Local<v8::Function>(v8::Function::Cast(*args[1]));
+ v8::Isolate* isolate = args.GetIsolate();
v8::Persistent<v8::Function> callback =
- v8::Persistent<v8::Function>::New(callback_local);
+ v8::Persistent<v8::Function>::New(isolate, callback_local);
v8::Persistent<v8::Context> context =
- v8::Persistent<v8::Context>::New(web_frame->mainWorldScriptContext());
+ v8::Persistent<v8::Context>::New(isolate,
+ web_frame->mainWorldScriptContext());
int pixels_to_scroll = args[2]->IntegerValue();
@@ -410,8 +413,9 @@ class GpuBenchmarkingWrapper : public v8::Extension {
1,
argv);
}
- callback.Dispose();
- context.Dispose();
+ v8::Isolate* isolate = context->GetIsolate();
+ callback.Dispose(isolate);
+ context.Dispose(isolate);
}
static v8::Handle<v8::Value> BeginWindowSnapshotPNG(
@@ -433,10 +437,12 @@ class GpuBenchmarkingWrapper : public v8::Extension {
v8::Local<v8::Function> callback_local =
v8::Local<v8::Function>(v8::Function::Cast(*args[0]));
+ v8::Isolate* isolate = args.GetIsolate();
v8::Persistent<v8::Function> callback =
- v8::Persistent<v8::Function>::New(callback_local);
+ v8::Persistent<v8::Function>::New(isolate, callback_local);
v8::Persistent<v8::Context> context =
- v8::Persistent<v8::Context>::New(web_frame->mainWorldScriptContext());
+ v8::Persistent<v8::Context>::New(isolate,
+ web_frame->mainWorldScriptContext());
render_view_impl->GetWindowSnapshot(
base::Bind(&OnSnapshotCompleted, callback, context));
diff --git a/content/renderer/v8_value_converter_impl_unittest.cc b/content/renderer/v8_value_converter_impl_unittest.cc
index 3a6cdbf..46572c6 100644
--- a/content/renderer/v8_value_converter_impl_unittest.cc
+++ b/content/renderer/v8_value_converter_impl_unittest.cc
@@ -32,7 +32,7 @@ class V8ValueConverterImplTest : public testing::Test {
}
virtual void TearDown() {
- context_.Dispose();
+ context_.Dispose(context_->GetIsolate());
}
std::string GetString(DictionaryValue* value, const std::string& key) {