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

Unified Diff: chrome/renderer/extensions/console.cc

Issue 98543004: Remove usage of deprecated V8 APIs from c/r/extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years 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 | « chrome/renderer/extensions/chrome_v8_context_set.cc ('k') | chrome/renderer/extensions/dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/console.cc
diff --git a/chrome/renderer/extensions/console.cc b/chrome/renderer/extensions/console.cc
index 009d665b22bef9c81aab89628441271c1c92f203..97fc49c665c3d01dd74b17295d413acf895f47ed 100644
--- a/chrome/renderer/extensions/console.cc
+++ b/chrome/renderer/extensions/console.cc
@@ -72,9 +72,9 @@ void BoundLogMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
for (int i = 0; i < info.Length(); ++i) {
if (i > 0)
message += " ";
- message += *v8::String::AsciiValue(info[i]);
+ message += *v8::String::Utf8Value(info[i]);
}
- (*log_method)(v8::Context::GetCalling(), message);
+ (*log_method)(info.GetIsolate()->GetCallingContext(), message);
}
void BindLogMethod(v8::Isolate* isolate,
@@ -175,13 +175,13 @@ void AddMessage(v8::Handle<v8::Context> context,
v8::Local<v8::Object> AsV8Object() {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
- v8::HandleScope handle_scope(isolate);
+ v8::EscapableHandleScope handle_scope(isolate);
v8::Local<v8::Object> console_object = v8::Object::New();
BindLogMethod(isolate, console_object, "debug", &Debug);
BindLogMethod(isolate, console_object, "log", &Log);
BindLogMethod(isolate, console_object, "warn", &Warn);
BindLogMethod(isolate, console_object, "error", &Error);
- return handle_scope.Close(console_object);
+ return handle_scope.Escape(console_object);
}
} // namespace console
« no previous file with comments | « chrome/renderer/extensions/chrome_v8_context_set.cc ('k') | chrome/renderer/extensions/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698