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

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

Issue 939613002: Add [TypeChecking=Unrestricted] on DevToolsHost interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | Source/core/inspector/DevToolsHost.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1b9297c612376d6e76be45a94b9a2e77e2567eb0..88c602d6b669d538c75407a85107fe96278f49f7 100644
--- a/Source/bindings/core/v8/custom/V8DevToolsHostCustom.cpp
+++ b/Source/bindings/core/v8/custom/V8DevToolsHostCustom.cpp
@@ -130,13 +130,10 @@ void V8DevToolsHost::showContextMenuAtPointMethodCustom(const v8::FunctionCallba
if (info.Length() < 3)
return;
- v8::Local<v8::Value> x = v8::Local<v8::Value>::Cast(info[0]);
- if (!x->IsNumber())
- return;
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "showContextMenuAtPoint", "DevToolsHost", info.Holder(), info.GetIsolate());
- v8::Local<v8::Value> y = v8::Local<v8::Value>::Cast(info[1]);
- if (!y->IsNumber())
- return;
+ TONATIVE_VOID_EXCEPTIONSTATE(float, x, toRestrictedFloat(info[0], exceptionState), exceptionState);
+ TONATIVE_VOID_EXCEPTIONSTATE(float, y, toRestrictedFloat(info[1], exceptionState), exceptionState);
v8::Local<v8::Value> array = v8::Local<v8::Value>::Cast(info[2]);
if (!array->IsArray())
@@ -164,7 +161,7 @@ void V8DevToolsHost::showContextMenuAtPointMethodCustom(const v8::FunctionCallba
DevToolsHost* devtoolsHost = V8DevToolsHost::toImpl(info.Holder());
Vector<ContextMenuItem> items = menu.items();
- devtoolsHost->showContextMenu(document->frame(), static_cast<float>(x->NumberValue()), static_cast<float>(y->NumberValue()), items);
+ devtoolsHost->showContextMenu(document->frame(), x, y, items);
}
} // namespace blink
« no previous file with comments | « no previous file | Source/core/inspector/DevToolsHost.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698