Chromium Code Reviews| Index: Source/core/inspector/InjectedScript.cpp |
| diff --git a/Source/core/inspector/InjectedScript.cpp b/Source/core/inspector/InjectedScript.cpp |
| index c6c60548a54dcdbbea5484f9db9625c0ce8680f7..c5508f1064f58bc2288c0e531175f3cd42cb980c 100644 |
| --- a/Source/core/inspector/InjectedScript.cpp |
| +++ b/Source/core/inspector/InjectedScript.cpp |
| @@ -424,6 +424,28 @@ void InjectedScript::setCustomObjectFormatterEnabled(bool enabled) |
| makeCall(function, &result); |
| } |
| +v8::Local<v8::Array> InjectedScript::frameworksEventListeners(v8::Local<v8::Value> object) |
| +{ |
| + ScriptFunctionCall function(injectedScriptObject(), "frameworksEventListeners"); |
|
yurys
2015/08/13 23:49:06
Extract common code into a method.
kozy
2015/08/14 17:07:03
Done.
|
| + function.appendArgument(object); |
| + bool hadException = false; |
| + ScriptValue result = callFunctionWithEvalEnabled(function, hadException); |
| + if (!hadException && !result.isEmpty()) |
| + return result.v8Value().As<v8::Array>(); |
| + return v8::Local<v8::Array>(); |
| +} |
| + |
| +v8::Local<v8::Set> InjectedScript::frameworksEventHandlers(v8::Local<v8::Value> object) |
| +{ |
| + ScriptFunctionCall function(injectedScriptObject(), "frameworksEventHandlers"); |
| + function.appendArgument(object); |
| + bool hadException = false; |
| + ScriptValue result = callFunctionWithEvalEnabled(function, hadException); |
| + if (!hadException && !result.isEmpty()) |
| + return result.v8Value().As<v8::Set>(); |
| + return v8::Local<v8::Set>(); |
| +} |
| + |
| void InjectedScript::initialize(ScriptValue injectedScriptObject, InspectedStateAccessCheck accessCheck) |
| { |
| m_injectedScriptObject = injectedScriptObject; |