| Index: content/renderer/browser_plugin/browser_plugin.cc
|
| diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
|
| index 573ff76bb1de82c478ea0952b5e622681b2d0175..9308f64803609c564f696350a503369a93277968 100644
|
| --- a/content/renderer/browser_plugin/browser_plugin.cc
|
| +++ b/content/renderer/browser_plugin/browser_plugin.cc
|
| @@ -855,8 +855,10 @@ void BrowserPlugin::PersistRequestObject(
|
| return;
|
| }
|
|
|
| + v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
| v8::Persistent<v8::Value> weak_request =
|
| - v8::Persistent<v8::Value>::New(WebKit::WebBindings::toV8Value(request));
|
| + v8::Persistent<v8::Value>::New(isolate,
|
| + WebKit::WebBindings::toV8Value(request));
|
|
|
| AliveV8PermissionRequestItem* new_item =
|
| new std::pair<int, base::WeakPtr<BrowserPlugin> >(
|
| @@ -867,12 +869,12 @@ void BrowserPlugin::PersistRequestObject(
|
| std::make_pair(id, new_item));
|
| CHECK(result.second); // Inserted in the map.
|
| AliveV8PermissionRequestItem* request_item = result.first->second;
|
| - weak_request.MakeWeak(request_item, WeakCallbackForPersistObject);
|
| + weak_request.MakeWeak(isolate, request_item, WeakCallbackForPersistObject);
|
| }
|
|
|
| // static
|
| void BrowserPlugin::WeakCallbackForPersistObject(
|
| - v8::Persistent<v8::Value> object, void* param) {
|
| + v8::Isolate* isolate, v8::Persistent<v8::Value> object, void* param) {
|
| v8::Persistent<v8::Object> persistent_object =
|
| v8::Persistent<v8::Object>::Cast(object);
|
|
|
| @@ -882,7 +884,7 @@ void BrowserPlugin::WeakCallbackForPersistObject(
|
| base::WeakPtr<BrowserPlugin> plugin = item_ptr->second;
|
| delete item_ptr;
|
|
|
| - persistent_object.Dispose();
|
| + persistent_object.Dispose(isolate);
|
| persistent_object.Clear();
|
|
|
| if (plugin) {
|
|
|