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

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

Issue 12313142: Revert 184837 (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 | « chrome/renderer/extensions/send_request_natives.h ('k') | chrome/renderer/extensions/set_icon_natives.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/send_request_natives.cc
===================================================================
--- chrome/renderer/extensions/send_request_natives.cc (revision 184858)
+++ chrome/renderer/extensions/send_request_natives.cc (working copy)
@@ -13,11 +13,8 @@
namespace extensions {
SendRequestNatives::SendRequestNatives(Dispatcher* dispatcher,
- RequestSender* request_sender,
- ChromeV8Context* context)
- : ChromeV8Extension(dispatcher, context->v8_context()),
- request_sender_(request_sender),
- context_(context) {
+ RequestSender* request_sender)
+ : ChromeV8Extension(dispatcher), request_sender_(request_sender) {
RouteFunction("GetNextRequestId",
base::Bind(&SendRequestNatives::GetNextRequestId,
base::Unretained(this)));
@@ -45,21 +42,21 @@
scoped_ptr<V8ValueConverter> converter(V8ValueConverter::create());
// See http://crbug.com/149880. The context menus APIs relies on this, but
- // we shouldn't really be doing it (e.g. for the sake of the storage API).
+ // we shouln't really be doing it (e.g. for the sake of the storage API).
converter->SetFunctionAllowed(true);
if (!preserve_null_in_objects)
converter->SetStripNullFromObjects(true);
- scoped_ptr<Value> value_args(converter->FromV8Value(args[1], v8_context()));
+ scoped_ptr<Value> value_args(
+ converter->FromV8Value(args[1], v8::Context::GetCurrent()));
if (!value_args.get() || !value_args->IsType(Value::TYPE_LIST)) {
NOTREACHED() << "Unable to convert args passed to StartRequest";
return v8::Undefined();
}
- request_sender_->StartRequest(
- context_, name, request_id, has_callback, for_io_thread,
- static_cast<ListValue*>(value_args.get()));
+ request_sender_->StartRequest(name, request_id, has_callback, for_io_thread,
+ static_cast<ListValue*>(value_args.get()));
return v8::Undefined();
}
« no previous file with comments | « chrome/renderer/extensions/send_request_natives.h ('k') | chrome/renderer/extensions/set_icon_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698