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

Unified Diff: Source/bindings/core/v8/custom/V8DevToolsHostCustom.cpp

Issue 1097273002: Refactor core/v8/* methods to take isolate as first parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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
Index: Source/bindings/core/v8/custom/V8DevToolsHostCustom.cpp
diff --git a/Source/bindings/core/v8/custom/V8DevToolsHostCustom.cpp b/Source/bindings/core/v8/custom/V8DevToolsHostCustom.cpp
index 47f71fc5000e1adfd893fe06081c1cd8d5f19c96..bce8c93358a3a865d1b5bfcf21ae645b43f5c7f1 100644
--- a/Source/bindings/core/v8/custom/V8DevToolsHostCustom.cpp
+++ b/Source/bindings/core/v8/custom/V8DevToolsHostCustom.cpp
@@ -56,7 +56,7 @@ void V8DevToolsHost::platformMethodCustom(const v8::FunctionCallbackInfo<v8::Val
#endif
}
-static bool populateContextMenuItems(const v8::Local<v8::Array>& itemArray, ContextMenu& menu, v8::Isolate* isolate)
+static bool populateContextMenuItems(v8::Isolate* isolate, const v8::Local<v8::Array>& itemArray, ContextMenu& menu)
{
v8::Local<v8::Context> context = isolate->GetCurrentContext();
for (size_t i = 0; i < itemArray->Length(); ++i) {
@@ -86,7 +86,7 @@ static bool populateContextMenuItems(const v8::Local<v8::Array>& itemArray, Cont
} else if (typeString == "subMenu" && subItems->IsArray()) {
ContextMenu subMenu;
v8::Local<v8::Array> subItemsArray = v8::Local<v8::Array>::Cast(subItems);
- if (!populateContextMenuItems(subItemsArray, subMenu, isolate))
+ if (!populateContextMenuItems(isolate, subItemsArray, subMenu))
return false;
TOSTRING_DEFAULT(V8StringResource<TreatNullAsNullString>, labelString, label, false);
ContextMenuItem item(SubmenuType,
@@ -127,7 +127,7 @@ void V8DevToolsHost::showContextMenuMethodCustom(const v8::FunctionCallbackInfo<
v8::Local<v8::Array> array = v8::Local<v8::Array>::Cast(info[1]);
ContextMenu menu;
- if (!populateContextMenuItems(array, menu, info.GetIsolate()))
+ if (!populateContextMenuItems(info.GetIsolate(), array, menu))
return;
DevToolsHost* devtoolsHost = V8DevToolsHost::toImpl(info.Holder());
@@ -149,7 +149,7 @@ void V8DevToolsHost::showContextMenuAtPointMethodCustom(const v8::FunctionCallba
if (!array->IsArray())
return;
ContextMenu menu;
- if (!populateContextMenuItems(v8::Local<v8::Array>::Cast(array), menu, info.GetIsolate()))
+ if (!populateContextMenuItems(info.GetIsolate(), v8::Local<v8::Array>::Cast(array), menu))
return;
Document* document = nullptr;
« no previous file with comments | « Source/bindings/core/v8/custom/V8CustomEventCustom.cpp ('k') | Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698