Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 151 if (info.Length() >= 4) { | 151 if (info.Length() >= 4) { |
| 152 v8::Local<v8::Object> documentWrapper = v8::Local<v8::Object>::Cast(info [3]); | 152 v8::Local<v8::Object> documentWrapper = v8::Local<v8::Object>::Cast(info [3]); |
| 153 if (!V8HTMLDocument::wrapperTypeInfo.equals(toWrapperTypeInfo(documentWr apper))) | 153 if (!V8HTMLDocument::wrapperTypeInfo.equals(toWrapperTypeInfo(documentWr apper))) |
| 154 return; | 154 return; |
| 155 document = V8HTMLDocument::toImpl(documentWrapper); | 155 document = V8HTMLDocument::toImpl(documentWrapper); |
| 156 } else { | 156 } else { |
| 157 v8::Isolate* isolate = info.GetIsolate(); | 157 v8::Isolate* isolate = info.GetIsolate(); |
| 158 v8::Handle<v8::Object> windowWrapper = V8Window::findInstanceInPrototype Chain(isolate->GetEnteredContext()->Global(), isolate); | 158 v8::Handle<v8::Object> windowWrapper = V8Window::findInstanceInPrototype Chain(isolate->GetEnteredContext()->Global(), isolate); |
| 159 if (windowWrapper.IsEmpty()) | 159 if (windowWrapper.IsEmpty()) |
| 160 return; | 160 return; |
| 161 LocalDOMWindow* window = V8Window::toImpl(windowWrapper); | 161 DOMWindow* window = V8Window::toImpl(windowWrapper); |
| 162 document = window ? window->document() : nullptr; | 162 document = window ? toLocalDOMWindow(window)->document() : nullptr; |
|
haraken
2014/10/31 06:07:04
Shouldn't this be:
document = window->isLocalDO
dcheng
2014/10/31 06:31:01
See my previous comment. This code should only eve
| |
| 163 } | 163 } |
| 164 if (!document || !document->page()) | 164 if (!document || !document->page()) |
| 165 return; | 165 return; |
| 166 | 166 |
| 167 InspectorFrontendHost* frontendHost = V8InspectorFrontendHost::toImpl(info.H older()); | 167 InspectorFrontendHost* frontendHost = V8InspectorFrontendHost::toImpl(info.H older()); |
| 168 Vector<ContextMenuItem> items = menu.items(); | 168 Vector<ContextMenuItem> items = menu.items(); |
| 169 frontendHost->showContextMenu(document->page(), static_cast<float>(x->Number Value()), static_cast<float>(y->NumberValue()), items); | 169 frontendHost->showContextMenu(document->page(), static_cast<float>(x->Number Value()), static_cast<float>(y->NumberValue()), items); |
| 170 } | 170 } |
| 171 | 171 |
| 172 static void histogramEnumeration(const char* name, const v8::FunctionCallbackInf o<v8::Value>& info, int boundaryValue) | 172 static void histogramEnumeration(const char* name, const v8::FunctionCallbackInf o<v8::Value>& info, int boundaryValue) |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 184 histogramEnumeration("DevTools.ActionTaken", info, 100); | 184 histogramEnumeration("DevTools.ActionTaken", info, 100); |
| 185 } | 185 } |
| 186 | 186 |
| 187 void V8InspectorFrontendHost::recordPanelShownMethodCustom(const v8::FunctionCal lbackInfo<v8::Value>& info) | 187 void V8InspectorFrontendHost::recordPanelShownMethodCustom(const v8::FunctionCal lbackInfo<v8::Value>& info) |
| 188 { | 188 { |
| 189 histogramEnumeration("DevTools.PanelShown", info, 20); | 189 histogramEnumeration("DevTools.PanelShown", info, 20); |
| 190 } | 190 } |
| 191 | 191 |
| 192 } // namespace blink | 192 } // namespace blink |
| 193 | 193 |
| OLD | NEW |