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(
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
// of EventListener and EventHandler
std::unique_ptr<SourceLocation> GetFunctionLocation(
......
......@@ -55,10 +55,6 @@ v8::Local<v8::Object> EventListenerHandler(ExecutionContext*, EventListener*);
v8::Local<v8::Function> EventListenerEffectiveFunction(
v8::Isolate*,
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*,
EventListener*);
......
......@@ -459,20 +459,15 @@ InspectorDOMDebuggerAgent::BuildObjectForEventListener(
if (function.IsEmpty())
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 =
protocol::DOMDebugger::EventListener::create()
.setType(info.event_type)
.setUseCapture(info.use_capture)
.setPassive(info.passive)
.setOnce(info.once)
.setScriptId(script_id)
.setLineNumber(line_number)
.setColumnNumber(column_number)
.setScriptId(String::Number(function->ScriptId()))
.setLineNumber(function->GetScriptLineNumber())
.setColumnNumber(function->GetScriptColumnNumber())
.build();
if (object_group_id.length()) {
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