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

Unified Diff: content/renderer/gpu/gpu_benchmarking_extension.cc

Issue 12210035: Use non-deprecated versions of v8::Persistent::New/Dispose. (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 | « no previous file | content/renderer/v8_value_converter_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/gpu_benchmarking_extension.cc
diff --git a/content/renderer/gpu/gpu_benchmarking_extension.cc b/content/renderer/gpu/gpu_benchmarking_extension.cc
index 299c5f37476c025ccb57ef69c7ed1f1a64c328e2..dbef50bbd79319563f6cfd8909432eb6ac0eb14b 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));
« no previous file with comments | « no previous file | content/renderer/v8_value_converter_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698