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

Unified Diff: content/renderer/skia_benchmarking_extension.cc

Issue 301883002: Should provide creation context and isolate for WebArrayConverter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed bad coding style Created 6 years, 6 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/v8_var_converter.cc ('k') | content/renderer/v8_value_converter_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/skia_benchmarking_extension.cc
diff --git a/content/renderer/skia_benchmarking_extension.cc b/content/renderer/skia_benchmarking_extension.cc
index 4f25ce2ca3bec769da61ec908ef4755df652ec22..568eb058f0b747c562f76a379ab588a10379808d 100644
--- a/content/renderer/skia_benchmarking_extension.cc
+++ b/content/renderer/skia_benchmarking_extension.cc
@@ -131,13 +131,14 @@ void SkiaBenchmarking::Rasterize(gin::Arguments* args) {
int stop_index = -1;
bool overdraw = false;
+ v8::Handle<v8::Context> context = isolate->GetCurrentContext();
if (!args->PeekNext().IsEmpty()) {
v8::Handle<v8::Value> params;
args->GetNext(&params);
scoped_ptr<content::V8ValueConverter> converter(
content::V8ValueConverter::create());
scoped_ptr<base::Value> params_value(
- converter->FromV8Value(params, isolate->GetCurrentContext()));
+ converter->FromV8Value(params, context));
const base::DictionaryValue* params_dict = NULL;
if (params_value.get() && params_value->GetAsDictionary(&params_dict)) {
@@ -203,7 +204,8 @@ void SkiaBenchmarking::Rasterize(gin::Arguments* args) {
result->Set(v8::String::NewFromUtf8(isolate, "height"),
v8::Number::New(isolate, snapped_clip.height()));
result->Set(v8::String::NewFromUtf8(isolate, "data"),
- blink::WebArrayBufferConverter::toV8Value(&buffer));
+ blink::WebArrayBufferConverter::toV8Value(
+ &buffer, context->Global(), isolate));
args->Return(result);
}
« no previous file with comments | « content/renderer/pepper/v8_var_converter.cc ('k') | content/renderer/v8_value_converter_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698