Commit 663a4791 authored by Yuki Yamada's avatar Yuki Yamada Committed by Commit Bot

Remove "void GetFunctionLocation()"

This CL removes "void GetFunctionLocation(...)".
Only InspectorDOMDebuggerAgent::BuildObjectForEventListener() used this
method to set some values and it was not useful.
"std::unique_ptr<SourceLocation> GetFunctionLocation(...)" will be
moved into another class in following CL as commented, so this CL
addresses void one first.

Bug: 872138
Change-Id: I6cbb771a11c50d70654eac2918d5246b6838adc4
Reviewed-on: https://chromium-review.googlesource.com/1219427Reviewed-by: default avatarYuki Shiino <yukishiino@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
Commit-Queue: Yuki Yamada <yukiy@google.com>
Cr-Commit-Position: refs/heads/master@{#590556}
parent d18aae43
...@@ -135,16 +135,6 @@ v8::Local<v8::Function> EventListenerEffectiveFunction( ...@@ -135,16 +135,6 @@ v8::Local<v8::Function> EventListenerEffectiveFunction(
return v8::Local<v8::Function>(); return v8::Local<v8::Function>();
} }
void GetFunctionLocation(v8::Local<v8::Function> function,
String& script_id,
int& line_number,
int& column_number) {
int script_id_value = function->ScriptId();
script_id = String::Number(script_id_value);
line_number = function->GetScriptLineNumber();
column_number = function->GetScriptColumnNumber();
}
// TODO(yukiy): move this method into V8EventListenerImpl or interface class // TODO(yukiy): move this method into V8EventListenerImpl or interface class
// of EventListener and EventHandler // of EventListener and EventHandler
std::unique_ptr<SourceLocation> GetFunctionLocation( std::unique_ptr<SourceLocation> GetFunctionLocation(
......
...@@ -55,10 +55,6 @@ v8::Local<v8::Object> EventListenerHandler(ExecutionContext*, EventListener*); ...@@ -55,10 +55,6 @@ v8::Local<v8::Object> EventListenerHandler(ExecutionContext*, EventListener*);
v8::Local<v8::Function> EventListenerEffectiveFunction( v8::Local<v8::Function> EventListenerEffectiveFunction(
v8::Isolate*, v8::Isolate*,
v8::Local<v8::Object> handler); v8::Local<v8::Object> handler);
void GetFunctionLocation(v8::Local<v8::Function>,
String& script_id,
int& line_number,
int& column_number);
std::unique_ptr<SourceLocation> GetFunctionLocation(ExecutionContext*, std::unique_ptr<SourceLocation> GetFunctionLocation(ExecutionContext*,
EventListener*); EventListener*);
......
...@@ -459,20 +459,15 @@ InspectorDOMDebuggerAgent::BuildObjectForEventListener( ...@@ -459,20 +459,15 @@ InspectorDOMDebuggerAgent::BuildObjectForEventListener(
if (function.IsEmpty()) if (function.IsEmpty())
return nullptr; return nullptr;
String script_id;
int line_number;
int column_number;
GetFunctionLocation(function, script_id, line_number, column_number);
std::unique_ptr<protocol::DOMDebugger::EventListener> value = std::unique_ptr<protocol::DOMDebugger::EventListener> value =
protocol::DOMDebugger::EventListener::create() protocol::DOMDebugger::EventListener::create()
.setType(info.event_type) .setType(info.event_type)
.setUseCapture(info.use_capture) .setUseCapture(info.use_capture)
.setPassive(info.passive) .setPassive(info.passive)
.setOnce(info.once) .setOnce(info.once)
.setScriptId(script_id) .setScriptId(String::Number(function->ScriptId()))
.setLineNumber(line_number) .setLineNumber(function->GetScriptLineNumber())
.setColumnNumber(column_number) .setColumnNumber(function->GetScriptColumnNumber())
.build(); .build();
if (object_group_id.length()) { if (object_group_id.length()) {
value->setHandler(v8_session_->wrapObject( value->setHandler(v8_session_->wrapObject(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment