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

Side by Side Diff: Source/bindings/core/v8/custom/V8DevToolsHostCustom.cpp

Issue 1074683002: [bindings] Use Local<> instead of Handle<> (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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007-2009 Google Inc. All rights reserved. 2 * Copyright (C) 2007-2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 return; 153 return;
154 154
155 Document* document = nullptr; 155 Document* document = nullptr;
156 if (info.Length() >= 4 && v8::Local<v8::Value>::Cast(info[3])->IsObject()) { 156 if (info.Length() >= 4 && v8::Local<v8::Value>::Cast(info[3])->IsObject()) {
157 v8::Local<v8::Object> documentWrapper = v8::Local<v8::Object>::Cast(info [3]); 157 v8::Local<v8::Object> documentWrapper = v8::Local<v8::Object>::Cast(info [3]);
158 if (!V8HTMLDocument::wrapperTypeInfo.equals(toWrapperTypeInfo(documentWr apper))) 158 if (!V8HTMLDocument::wrapperTypeInfo.equals(toWrapperTypeInfo(documentWr apper)))
159 return; 159 return;
160 document = V8HTMLDocument::toImpl(documentWrapper); 160 document = V8HTMLDocument::toImpl(documentWrapper);
161 } else { 161 } else {
162 v8::Isolate* isolate = info.GetIsolate(); 162 v8::Isolate* isolate = info.GetIsolate();
163 v8::Handle<v8::Object> windowWrapper = V8Window::findInstanceInPrototype Chain(isolate->GetEnteredContext()->Global(), isolate); 163 v8::Local<v8::Object> windowWrapper = V8Window::findInstanceInPrototypeC hain(isolate->GetEnteredContext()->Global(), isolate);
164 if (windowWrapper.IsEmpty()) 164 if (windowWrapper.IsEmpty())
165 return; 165 return;
166 DOMWindow* window = V8Window::toImpl(windowWrapper); 166 DOMWindow* window = V8Window::toImpl(windowWrapper);
167 document = window ? toLocalDOMWindow(window)->document() : nullptr; 167 document = window ? toLocalDOMWindow(window)->document() : nullptr;
168 } 168 }
169 if (!document || !document->frame()) 169 if (!document || !document->frame())
170 return; 170 return;
171 171
172 DevToolsHost* devtoolsHost = V8DevToolsHost::toImpl(info.Holder()); 172 DevToolsHost* devtoolsHost = V8DevToolsHost::toImpl(info.Holder());
173 Vector<ContextMenuItem> items = menu.items(); 173 Vector<ContextMenuItem> items = menu.items();
174 devtoolsHost->showContextMenu(document->frame(), x, y, items); 174 devtoolsHost->showContextMenu(document->frame(), x, y, items);
175 } 175 }
176 176
177 } // namespace blink 177 } // namespace blink
178 178
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/custom/V8CustomEventCustom.cpp ('k') | Source/bindings/core/v8/custom/V8ErrorEventCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698