| Index: chrome/renderer/extensions/request_sender.cc
|
| diff --git a/chrome/renderer/extensions/request_sender.cc b/chrome/renderer/extensions/request_sender.cc
|
| index a9269aefe09089ca88eab33ea671b2a38f5ba01c..7ad4a243a59e48415371616f93896745b21b062e 100644
|
| --- a/chrome/renderer/extensions/request_sender.cc
|
| +++ b/chrome/renderer/extensions/request_sender.cc
|
| @@ -21,15 +21,12 @@ namespace extensions {
|
| // Contains info relevant to a pending API request.
|
| struct PendingRequest {
|
| public :
|
| - PendingRequest(ChromeV8Context* context,
|
| - ChromeV8Context* caller_context,
|
| - const std::string& name)
|
| - : name(name), context(context), caller_context(caller_context) {
|
| + PendingRequest(const std::string& name, ChromeV8Context* context)
|
| + : name(name), context(context) {
|
| }
|
|
|
| std::string name;
|
| ChromeV8Context* context;
|
| - ChromeV8Context* caller_context;
|
| };
|
|
|
| RequestSender::RequestSender(Dispatcher* dispatcher) : dispatcher_(dispatcher) {
|
| @@ -84,19 +81,12 @@ void RequestSender::StartRequest(ChromeV8Context* context,
|
| source_origin = webframe->document().securityOrigin();
|
| }
|
|
|
| - std::string extension_id = context->GetExtensionID();
|
| - // Insert the current context into the PendingRequest because that's the
|
| - // context that we call back on.
|
| - InsertRequest(
|
| - request_id,
|
| - new PendingRequest(context,
|
| - dispatcher_->v8_context_set().GetCurrent(),
|
| - name));
|
| + InsertRequest(request_id, new PendingRequest(name, context));
|
|
|
| ExtensionHostMsg_Request_Params params;
|
| params.name = name;
|
| params.arguments.Swap(value_args);
|
| - params.extension_id = extension_id;
|
| + params.extension_id = context->GetExtensionID();
|
| params.source_url = source_url;
|
| params.source_origin = source_origin.toString();
|
| params.request_id = request_id;
|
| @@ -136,9 +126,9 @@ void RequestSender::HandleResponse(int request_id,
|
|
|
| v8::Handle<v8::Value> retval;
|
| CHECK(request->context->CallChromeHiddenMethod("handleResponse",
|
| - arraysize(argv),
|
| - argv,
|
| - &retval));
|
| + arraysize(argv),
|
| + argv,
|
| + &retval));
|
| // In debug, the js will validate the callback parameters and return a
|
| // string if a validation error has occured.
|
| if (DCHECK_IS_ON()) {
|
|
|