Changeset 111005 in webkit


Ignore:
Timestamp:
Mar 16, 2012 7:43:13 AM (12 years ago)
Author:
yurys@chromium.org
Message:

Web Inspector: TypeBuilder: Introduce OptOutput class for optional output parameters
https://bugs.webkit.org/show_bug.cgi?id=80789

Patch by Peter Rybin <peter.rybin@gmail.com> on 2012-03-16
Reviewed by Yury Semikhatsky.

OptOutput class is added for optional return parameters.

Strict mode added to Generator that makes all parameter types strict
and drop pre-set default values for return parameters.

Debugger and Page domain is switched to strict mode.

  • inspector/CodeGeneratorInspector.py:

(CommandReturnPassModel.OptOutput):
(CommandReturnPassModel.OptOutput.init):
(CommandReturnPassModel.OptOutput.get_return_var_type):
(CommandReturnPassModel.OptOutput.get_output_argument_prefix):
(CommandReturnPassModel.OptOutput.get_output_to_raw_expression):
(CommandReturnPassModel.OptOutput.get_output_parameter_type):
(CommandReturnPassModel):
(CommandReturnPassModel.OptOutput.get_set_return_condition):
(TypeModel.Enum.get_optional.EnumOptional.get_command_return_pass_model):
(TypeModel.ValueType.ValueOptional.get_command_return_pass_model):
(OptOutput):
(Generator.process_event):
(Generator.process_command):

  • inspector/ContentSearchUtils.cpp:

(WebCore::ContentSearchUtils::buildObjectForSearchMatch):
(WebCore::ContentSearchUtils::searchInTextByLines):

  • inspector/ContentSearchUtils.h:

(ContentSearchUtils):

  • inspector/InjectedScript.cpp:

(WebCore::InjectedScript::evaluate):
(WebCore::InjectedScript::callFunctionOn):
(WebCore::InjectedScript::evaluateOnCallFrame):
(WebCore::InjectedScript::makeEvalCall):

  • inspector/InjectedScript.h:

(InjectedScript):

  • inspector/InspectorDOMDebuggerAgent.cpp:

(WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
(WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
(WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):

  • inspector/InspectorDebuggerAgent.cpp:

(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::setBreakpoint):
(WebCore::InspectorDebuggerAgent::searchInContent):
(WebCore::InspectorDebuggerAgent::setScriptSource):
(WebCore::InspectorDebuggerAgent::getFunctionDetails):
(WebCore::InspectorDebuggerAgent::schedulePauseOnNextStatement):
(WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
(WebCore::InspectorDebuggerAgent::didPause):
(WebCore::InspectorDebuggerAgent::breakProgram):
(WebCore::InspectorDebuggerAgent::clearBreakDetails):

  • inspector/InspectorDebuggerAgent.h:

(InspectorDebuggerAgent):

  • inspector/InspectorPageAgent.cpp:

(WebCore::buildObjectForCookie):
(WebCore::buildArrayForCookies):
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::getResourceTree):
(WebCore::InspectorPageAgent::searchInResource):
(WebCore::InspectorPageAgent::searchInResources):
(WebCore::InspectorPageAgent::buildObjectForFrame):
(WebCore::InspectorPageAgent::buildObjectForFrameTree):

  • inspector/InspectorPageAgent.h:
  • inspector/InspectorRuntimeAgent.cpp:

(WebCore::InspectorRuntimeAgent::evaluate):
(WebCore::InspectorRuntimeAgent::callFunctionOn):

Location:
trunk/Source/WebCore
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r111004 r111005  
     12012-03-16  Peter Rybin  <peter.rybin@gmail.com>
     2
     3        Web Inspector: TypeBuilder: Introduce OptOutput class for optional output parameters
     4        https://bugs.webkit.org/show_bug.cgi?id=80789
     5
     6        Reviewed by Yury Semikhatsky.
     7
     8        OptOutput class is added for optional return parameters.
     9
     10        Strict mode added to Generator that makes all parameter types strict
     11        and drop pre-set default values for return parameters.
     12
     13        Debugger and Page domain is switched to strict mode.
     14
     15        * inspector/CodeGeneratorInspector.py:
     16        (CommandReturnPassModel.OptOutput):
     17        (CommandReturnPassModel.OptOutput.__init__):
     18        (CommandReturnPassModel.OptOutput.get_return_var_type):
     19        (CommandReturnPassModel.OptOutput.get_output_argument_prefix):
     20        (CommandReturnPassModel.OptOutput.get_output_to_raw_expression):
     21        (CommandReturnPassModel.OptOutput.get_output_parameter_type):
     22        (CommandReturnPassModel):
     23        (CommandReturnPassModel.OptOutput.get_set_return_condition):
     24        (TypeModel.Enum.get_optional.EnumOptional.get_command_return_pass_model):
     25        (TypeModel.ValueType.ValueOptional.get_command_return_pass_model):
     26        (OptOutput):
     27        (Generator.process_event):
     28        (Generator.process_command):
     29        * inspector/ContentSearchUtils.cpp:
     30        (WebCore::ContentSearchUtils::buildObjectForSearchMatch):
     31        (WebCore::ContentSearchUtils::searchInTextByLines):
     32        * inspector/ContentSearchUtils.h:
     33        (ContentSearchUtils):
     34        * inspector/InjectedScript.cpp:
     35        (WebCore::InjectedScript::evaluate):
     36        (WebCore::InjectedScript::callFunctionOn):
     37        (WebCore::InjectedScript::evaluateOnCallFrame):
     38        (WebCore::InjectedScript::makeEvalCall):
     39        * inspector/InjectedScript.h:
     40        (InjectedScript):
     41        * inspector/InspectorDOMDebuggerAgent.cpp:
     42        (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
     43        (WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
     44        (WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
     45        (WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
     46        (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
     47        (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
     48        * inspector/InspectorDebuggerAgent.cpp:
     49        (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
     50        (WebCore::InspectorDebuggerAgent::setBreakpoint):
     51        (WebCore::InspectorDebuggerAgent::searchInContent):
     52        (WebCore::InspectorDebuggerAgent::setScriptSource):
     53        (WebCore::InspectorDebuggerAgent::getFunctionDetails):
     54        (WebCore::InspectorDebuggerAgent::schedulePauseOnNextStatement):
     55        (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
     56        (WebCore::InspectorDebuggerAgent::didPause):
     57        (WebCore::InspectorDebuggerAgent::breakProgram):
     58        (WebCore::InspectorDebuggerAgent::clearBreakDetails):
     59        * inspector/InspectorDebuggerAgent.h:
     60        (InspectorDebuggerAgent):
     61        * inspector/InspectorPageAgent.cpp:
     62        (WebCore::buildObjectForCookie):
     63        (WebCore::buildArrayForCookies):
     64        (WebCore::InspectorPageAgent::getCookies):
     65        (WebCore::InspectorPageAgent::getResourceTree):
     66        (WebCore::InspectorPageAgent::searchInResource):
     67        (WebCore::InspectorPageAgent::searchInResources):
     68        (WebCore::InspectorPageAgent::buildObjectForFrame):
     69        (WebCore::InspectorPageAgent::buildObjectForFrameTree):
     70        * inspector/InspectorPageAgent.h:
     71        * inspector/InspectorRuntimeAgent.cpp:
     72        (WebCore::InspectorRuntimeAgent::evaluate):
     73        (WebCore::InspectorRuntimeAgent::callFunctionOn):
     74
    1752012-03-16  Kentaro Hara  <haraken@chromium.org>
    276
  • trunk/Source/WebCore/inspector/CodeGeneratorInspector.py

    r110854 r111005  
    5959TYPES_WITH_RUNTIME_CAST_SET = frozenset(["Runtime.RemoteObject", "Runtime.PropertyDescriptor",
    6060                                         "Debugger.FunctionDetails", "Debugger.CallFrame"])
     61
     62STRICT_ENABLED_DOMAINS = ["Debugger", "Page"]
    6163
    6264
     
    580582            return None
    581583
     584    class OptOutput:
     585        def __init__(self, var_type):
     586            self.var_type = var_type
     587
     588        def get_return_var_type(self):
     589            return "TypeBuilder::OptOutput<%s>" % self.var_type
     590
     591        @staticmethod
     592        def get_output_argument_prefix():
     593            return "&"
     594
     595        @staticmethod
     596        def get_output_to_raw_expression():
     597            return "%s.getValue()"
     598
     599        def get_output_parameter_type(self):
     600            return "TypeBuilder::OptOutput<%s>*" % self.var_type
     601
     602        @staticmethod
     603        def get_set_return_condition():
     604            return "%s.isAssigned()"
     605
    582606
    583607class TypeModel:
     
    618642                @staticmethod
    619643                def get_command_return_pass_model():
    620                     # FIXME: to be replaced with OptOutput model.
    621                     return CommandReturnPassModel.ByPointer(base_self.type_name)
     644                    return CommandReturnPassModel.OptOutput(base_self.type_name)
    622645
    623646                @staticmethod
     
    669692
    670693            def get_command_return_pass_model(self):
    671                 # FIXME: to be replaced with OptOutput model.
    672                 return CommandReturnPassModel.ByPointer(self.base.type_name)
     694                return CommandReturnPassModel.OptOutput(self.base.type_name)
    673695
    674696            def get_input_param_type_text(self):
     
    16981720        protocolErrors->pushString("${domainName} handler is not available.");
    16991721$methodOutCode
     1722$methodInCode
     1723    RefPtr<InspectorObject> result = InspectorObject::create();
    17001724    ErrorString error;
    1701 $methodInCode
    1702     if (!protocolErrors->length())
     1725    if (!protocolErrors->length()) {
    17031726        $agentField->$methodName(&error$agentCallParams);
    17041727
    1705     RefPtr<InspectorObject> result = InspectorObject::create();
    1706 ${responseCook}    sendResponse(callId, result, String::format("Some arguments of method '%s' can't be processed", "$domainName.$methodName"), protocolErrors, error);
     1728        if (!error.length()) {
     1729${responseCook}        }
     1730    }
     1731    sendResponse(callId, result, String::format("Some arguments of method '%s' can't be processed", "$domainName.$methodName"), protocolErrors, error);
    17071732}
    17081733""")
     
    21152140#include "InspectorValues.h"
    21162141#include <PlatformString.h>
     2142#include <wtf/Assertions.h>
    21172143#include <wtf/PassRefPtr.h>
    21182144
     
    21202146
    21212147namespace TypeBuilder {
     2148
     2149template<typename T>
     2150class OptOutput {
     2151public:
     2152    OptOutput() : m_assigned(false) { }
     2153
     2154    void operator=(T value)
     2155    {
     2156        m_value = value;
     2157        m_assigned = true;
     2158    }
     2159
     2160    bool isAssigned() { return m_assigned; }
     2161
     2162    T getValue()
     2163    {
     2164        ASSERT(isAssigned());
     2165        return m_value;
     2166    }
     2167
     2168private:
     2169    T m_value;
     2170    bool m_assigned;
     2171
     2172    WTF_MAKE_NONCOPYABLE(OptOutput);
     2173};
     2174
    21222175
    21232176// This class provides "Traits" type for the input type T. It is programmed using C++ template specialization
     
    25112564    def process_event(json_event, domain_name, frontend_method_declaration_lines):
    25122565        event_name = json_event["name"]
     2566
     2567        strict_mode = domain_name in STRICT_ENABLED_DOMAINS
     2568
    25132569        parameter_list = []
    25142570        method_line_list = []
     
    25372593                    raw_type_model = raw_type_model.get_optional()
    25382594
    2539                 annotated_type = get_annotated_type_text(raw_type_model.get_input_param_type_text(), type_model.get_input_param_type_text())
     2595                if strict_mode:
     2596                    # All types are strict.
     2597                    annotated_type = type_model.get_input_param_type_text()
     2598                    mode_type_binding = param_type_binding
     2599                else:
     2600                    # All types are raw.
     2601                    annotated_type = get_annotated_type_text(raw_type_model.get_input_param_type_text(), type_model.get_input_param_type_text())
     2602                    mode_type_binding = raw_type_binding
    25402603
    25412604                parameter_list.append("%s %s" % (annotated_type, parameter_name))
    25422605
    25432606                setter_argument = raw_type_model.get_event_setter_expression_pattern() % parameter_name
    2544                 if raw_type_binding.get_setter_value_expression_pattern():
    2545                     setter_argument = raw_type_binding.get_setter_value_expression_pattern() % setter_argument
     2607                if mode_type_binding.get_setter_value_expression_pattern():
     2608                    setter_argument = mode_type_binding.get_setter_value_expression_pattern() % setter_argument
    25462609
    25472610                setter_code = "    paramsObject->set%s(\"%s\", %s);\n" % (setter_type, parameter_name, setter_argument)
     
    25662629    def process_command(json_command, domain_name, agent_field_name, agent_interface_name):
    25672630        json_command_name = json_command["name"]
     2631
     2632        strict_mode = domain_name in STRICT_ENABLED_DOMAINS
     2633
    25682634        Generator.method_name_enum_list.append("        k%s_%sCmd," % (domain_name, json_command["name"]))
    25692635        Generator.method_handler_list.append("            &InspectorBackendDispatcherImpl::%s_%s," % (domain_name, json_command_name))
     
    26542720                    type_model = type_model.get_optional()
    26552721
    2656                 raw_type_model = return_type_binding.get_type_model()
    2657                 if optional:
    2658                     raw_type_model = raw_type_model.get_optional()
    2659 
    2660                 code = "    %s out_%s = %s;\n" % (raw_type.get_raw_type_model().get_command_return_pass_model().get_return_var_type(), json_return_name, initializer)
    2661                 param = ", %sout_%s" % (raw_type.get_output_pass_model().get_argument_prefix(), json_return_name)
    2662                 cook = "        result->set%s(\"%s\", out_%s);\n" % (setter_type, json_return_name, json_return_name)
    2663                 if optional:
    2664                     # FIXME: support optional properly. Probably an additional output parameter should be in each case.
    2665                     # FIXME: refactor this condition; it's a hack now.
    2666                     var_type_text = raw_type.get_raw_type_model().get_command_return_pass_model().get_return_var_type()
    2667                     if var_type_text == "bool" or var_type_text.startswith("RefPtr<"):
    2668                         cook = ("        if (out_%s)\n    " % json_return_name) + cook
    2669                     else:
    2670                         cook = "        // FIXME: support optional here.\n" + cook
    2671 
    2672                 annotated_type = get_annotated_type_text(raw_type.get_raw_type_model().get_command_return_pass_model().get_return_var_type() + raw_type.get_output_pass_model().get_parameter_type_suffix(),
    2673                                                          type_model.get_command_return_pass_model().get_output_parameter_type())
     2722                if strict_mode:
     2723                    # All types are strict. Values do not have default values.
     2724                    code = "    %s out_%s;\n" % (type_model.get_command_return_pass_model().get_return_var_type(), json_return_name)
     2725                    param = ", %sout_%s" % (type_model.get_command_return_pass_model().get_output_argument_prefix(), json_return_name)
     2726                    var_name = "out_%s" % json_return_name
     2727                    setter_argument = type_model.get_command_return_pass_model().get_output_to_raw_expression() % var_name
     2728                    if return_type_binding.get_setter_value_expression_pattern():
     2729                        setter_argument = return_type_binding.get_setter_value_expression_pattern() % setter_argument
     2730
     2731                    cook = "            result->set%s(\"%s\", %s);\n" % (setter_type, json_return_name,
     2732                                                                     setter_argument)
     2733
     2734                    set_condition_pattern = type_model.get_command_return_pass_model().get_set_return_condition()
     2735                    if set_condition_pattern:
     2736                        cook = ("            if (%s)\n    " % (set_condition_pattern % var_name)) + cook
     2737                    annotated_type = type_model.get_command_return_pass_model().get_output_parameter_type()
     2738                else:
     2739                    # All types are raw. Values always have default values.
     2740                    raw_type_model = return_type_binding.get_type_model()
     2741                    if optional:
     2742                        raw_type_model = raw_type_model.get_optional()
     2743
     2744                    code = "    %s out_%s = %s;\n" % (raw_type.get_raw_type_model().get_command_return_pass_model().get_return_var_type(), json_return_name, initializer)
     2745                    param = ", %sout_%s" % (raw_type.get_output_pass_model().get_argument_prefix(), json_return_name)
     2746                    cook = "            result->set%s(\"%s\", out_%s);\n" % (setter_type, json_return_name, json_return_name)
     2747                    if optional:
     2748                        # FIXME: support optional properly. Probably an additional output parameter should be in each case.
     2749                        # FIXME: refactor this condition; it's a hack now.
     2750                        var_type_text = raw_type.get_raw_type_model().get_command_return_pass_model().get_return_var_type()
     2751                        if var_type_text == "bool" or var_type_text.startswith("RefPtr<"):
     2752                            cook = ("            if (out_%s)\n    " % json_return_name) + cook
     2753                        else:
     2754                            cook = "            // FIXME: support optional here.\n" + cook
     2755
     2756                    annotated_type = get_annotated_type_text(raw_type.get_raw_type_model().get_command_return_pass_model().get_return_var_type() + raw_type.get_output_pass_model().get_parameter_type_suffix(),
     2757                                                             type_model.get_command_return_pass_model().get_output_parameter_type())
    26742758
    26752759                param_name = "out_%s" % json_return_name
     
    26872771            js_reply_list = "[%s]" % join(backend_js_reply_param_list, ", ")
    26882772
    2689             response_cook_text = "    if (!protocolErrors->length() && !error.length()) {\n%s    }\n" % join(response_cook_list, "")
     2773            response_cook_text = join(response_cook_list, "")
    26902774
    26912775        Generator.backend_method_implementation_list.append(Templates.backend_method.substitute(None,
  • trunk/Source/WebCore/inspector/ContentSearchUtils.cpp

    r110854 r111005  
    9595}
    9696
    97 static PassRefPtr<InspectorObject> buildObjectForSearchMatch(int lineNumber, String lineContent)
     97static PassRefPtr<TypeBuilder::Page::SearchMatch> buildObjectForSearchMatch(int lineNumber, String lineContent)
    9898{
    99     RefPtr<InspectorObject> result = InspectorObject::create();
    100     result->setNumber("lineNumber", lineNumber);
    101     result->setString("lineContent", lineContent);
    102 
    103     return result;
     99    return TypeBuilder::Page::SearchMatch::create()
     100        .setLineNumber(lineNumber)
     101        .setLineContent(lineContent);
    104102}
    105103
     
    129127}
    130128
    131 PassRefPtr<InspectorArray> searchInTextByLines(const String& text, const String& query, const bool caseSensitive, const bool isRegex)
     129PassRefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch> > searchInTextByLines(const String& text, const String& query, const bool caseSensitive, const bool isRegex)
    132130{
    133     RefPtr<InspectorArray> result = InspectorArray::create();
     131    RefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch> > result = TypeBuilder::Array<TypeBuilder::Page::SearchMatch>::create();
    134132
    135133    RegularExpression regex = ContentSearchUtils::createSearchRegex(query, caseSensitive, isRegex);
     
    137135
    138136    for (Vector<pair<int, String> >::const_iterator it = matches.begin(); it != matches.end(); ++it)
    139         result->pushValue(buildObjectForSearchMatch(it->first, it->second));
     137        result->addItem(buildObjectForSearchMatch(it->first, it->second));
    140138
    141139    return result;
  • trunk/Source/WebCore/inspector/ContentSearchUtils.h

    r110678 r111005  
    3030#define ContentSearchUtils_h
    3131
     32#include "InspectorTypeBuilder.h"
    3233#include "PlatformString.h"
    3334
     
    4344RegularExpression createSearchRegex(const String& query, bool caseSensitive, bool isRegex);
    4445int countRegularExpressionMatches(const RegularExpression&, const String&);
    45 PassRefPtr<InspectorArray> searchInTextByLines(const String& text, const String& query, const bool caseSensitive, const bool isRegex);
     46PassRefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch> > searchInTextByLines(const String& text, const String& query, const bool caseSensitive, const bool isRegex);
    4647
    4748String findSourceURL(const String& content);
  • trunk/Source/WebCore/inspector/InjectedScript.cpp

    r110854 r111005  
    6464}
    6565
    66 void InjectedScript::evaluate(ErrorString* errorString, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, RefPtr<InspectorObject>* result, bool* wasThrown)
     66void InjectedScript::evaluate(ErrorString* errorString, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, RefPtr<InspectorObject>* result, TypeBuilder::OptOutput<bool>* wasThrown)
    6767{
    6868    ScriptFunctionCall function(m_injectedScriptObject, "evaluate");
     
    7474}
    7575
    76 void InjectedScript::callFunctionOn(ErrorString* errorString, const String& objectId, const String& expression, const String& arguments, bool returnByValue, RefPtr<InspectorObject>* result, bool* wasThrown)
     76void InjectedScript::callFunctionOn(ErrorString* errorString, const String& objectId, const String& expression, const String& arguments, bool returnByValue, RefPtr<InspectorObject>* result, TypeBuilder::OptOutput<bool>* wasThrown)
    7777{
    7878    ScriptFunctionCall function(m_injectedScriptObject, "callFunctionOn");
     
    8484}
    8585
    86 void InjectedScript::evaluateOnCallFrame(ErrorString* errorString, const ScriptValue& callFrames, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, RefPtr<RemoteObject>* result, bool* wasThrown)
     86void InjectedScript::evaluateOnCallFrame(ErrorString* errorString, const ScriptValue& callFrames, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, RefPtr<RemoteObject>* result, TypeBuilder::OptOutput<bool>* wasThrown)
    8787{
    8888    ScriptFunctionCall function(m_injectedScriptObject, "evaluateOnCallFrame");
     
    260260}
    261261
    262 void InjectedScript::makeEvalCall(ErrorString* errorString, ScriptFunctionCall& function, RefPtr<InspectorObject>* objectResult, bool* wasThrown)
     262void InjectedScript::makeEvalCall(ErrorString* errorString, ScriptFunctionCall& function, RefPtr<InspectorObject>* objectResult, TypeBuilder::OptOutput<bool>* wasThrown)
    263263{
    264264    RefPtr<InspectorValue> result;
  • trunk/Source/WebCore/inspector/InjectedScript.h

    r110678 r111005  
    6565                  bool returnByValue,
    6666                  RefPtr<InspectorObject>* result,
    67                   bool* wasThrown);
     67                  TypeBuilder::OptOutput<bool>* wasThrown);
    6868    void callFunctionOn(ErrorString*,
    6969                        const String& objectId,
     
    7272                        bool returnByValue,
    7373                        RefPtr<InspectorObject>* result,
    74                         bool* wasThrown);
     74                        TypeBuilder::OptOutput<bool>* wasThrown);
    7575    void evaluateOnCallFrame(ErrorString*,
    7676                             const ScriptValue& callFrames,
     
    8181                             bool returnByValue,
    8282                             RefPtr<TypeBuilder::Runtime::RemoteObject>* result,
    83                              bool* wasThrown);
     83                             TypeBuilder::OptOutput<bool>* wasThrown);
    8484    void getFunctionDetails(ErrorString*, const String& functionId, RefPtr<TypeBuilder::Debugger::FunctionDetails>* result);
    8585    void getProperties(ErrorString*, const String& objectId, bool ownProperties, RefPtr<InspectorArray>* result);
     
    106106    ScriptValue callFunctionWithEvalEnabled(ScriptFunctionCall&, bool& hadException) const;
    107107    void makeCall(ScriptFunctionCall&, RefPtr<InspectorValue>* result);
    108     void makeEvalCall(ErrorString*, ScriptFunctionCall&, RefPtr<InspectorObject>* result, bool* wasThrown);
     108    void makeEvalCall(ErrorString*, ScriptFunctionCall&, RefPtr<InspectorObject>* result, TypeBuilder::OptOutput<bool>* wasThrown);
    109109    ScriptValue nodeAsScriptValue(Node*);
    110110
  • trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp

    r110854 r111005  
    3939#include "InspectorDOMAgent.h"
    4040#include "InspectorDebuggerAgent.h"
     41#include "InspectorFrontend.h"
    4142#include "InspectorInstrumentation.h"
    4243#include "InspectorState.h"
     
    5758static const char* const instrumentationEventCategoryType = "instrumentation:";
    5859
    59 static const char* const domNativeBreakpointType = "DOM";
    60 static const char* const eventListenerNativeBreakpointType = "EventListener";
    61 static const char* const xhrNativeBreakpointType = "XHR";
    62 
    6360const uint32_t inheritableDOMBreakpointTypesMask = (1 << SubtreeModified);
    6461const int domBreakpointDerivedTypeShift = 16;
     
    176173        RefPtr<InspectorObject> eventData = InspectorObject::create();
    177174        descriptionForDOMEvent(node, AttributeModified, false, eventData.get());
    178         m_debuggerAgent->breakProgram(domNativeBreakpointType, eventData.release());
     175        m_debuggerAgent->breakProgram(InspectorFrontend::Debugger::Reason::DOM, eventData.release());
    179176    }
    180177}
     
    276273        RefPtr<InspectorObject> eventData = InspectorObject::create();
    277274        descriptionForDOMEvent(parent, SubtreeModified, true, eventData.get());
    278         m_debuggerAgent->breakProgram(domNativeBreakpointType, eventData.release());
     275        m_debuggerAgent->breakProgram(InspectorFrontend::Debugger::Reason::DOM, eventData.release());
    279276    }
    280277}
     
    286283        RefPtr<InspectorObject> eventData = InspectorObject::create();
    287284        descriptionForDOMEvent(node, NodeRemoved, false, eventData.get());
    288         m_debuggerAgent->breakProgram(domNativeBreakpointType, eventData.release());
     285        m_debuggerAgent->breakProgram(InspectorFrontend::Debugger::Reason::DOM, eventData.release());
    289286    } else if (parentNode && hasBreakpoint(parentNode, SubtreeModified)) {
    290287        RefPtr<InspectorObject> eventData = InspectorObject::create();
    291288        descriptionForDOMEvent(node, SubtreeModified, false, eventData.get());
    292         m_debuggerAgent->breakProgram(domNativeBreakpointType, eventData.release());
     289        m_debuggerAgent->breakProgram(InspectorFrontend::Debugger::Reason::DOM, eventData.release());
    293290    }
    294291}
     
    299296        RefPtr<InspectorObject> eventData = InspectorObject::create();
    300297        descriptionForDOMEvent(element, AttributeModified, false, eventData.get());
    301         m_debuggerAgent->breakProgram(domNativeBreakpointType, eventData.release());
     298        m_debuggerAgent->breakProgram(InspectorFrontend::Debugger::Reason::DOM, eventData.release());
    302299    }
    303300}
     
    368365    eventData->setString("eventName", fullEventName);
    369366    if (synchronous)
    370         m_debuggerAgent->breakProgram(eventListenerNativeBreakpointType, eventData.release());
     367        m_debuggerAgent->breakProgram(InspectorFrontend::Debugger::Reason::EventListener, eventData.release());
    371368    else
    372         m_debuggerAgent->schedulePauseOnNextStatement(eventListenerNativeBreakpointType, eventData.release());
     369        m_debuggerAgent->schedulePauseOnNextStatement(InspectorFrontend::Debugger::Reason::EventListener, eventData.release());
    373370}
    374371
     
    418415    eventData->setString("breakpointURL", breakpointURL);
    419416    eventData->setString("url", url);
    420     m_debuggerAgent->breakProgram(xhrNativeBreakpointType, eventData.release());
     417    m_debuggerAgent->breakProgram(InspectorFrontend::Debugger::Reason::XHR, eventData.release());
    421418}
    422419
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp

    r110854 r111005  
    216216}
    217217
    218 void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString* errorString, int lineNumber, const String* const optionalURL, const String* const optionalURLRegex, const int* const optionalColumnNumber, const String* const optionalCondition, String* outBreakpointId, RefPtr<InspectorArray>& locationsRaw)
    219 {
    220     RefPtr<Array<TypeBuilder::Debugger::Location> > locations = Array<TypeBuilder::Debugger::Location>::create();
    221     locationsRaw = locations;
     218void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString* errorString, int lineNumber, const String* const optionalURL, const String* const optionalURLRegex, const int* const optionalColumnNumber, const String* const optionalCondition, TypeBuilder::Debugger::BreakpointId* outBreakpointId, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::Location> >& locations)
     219{
     220    locations = Array<TypeBuilder::Debugger::Location>::create();
    222221    if (!optionalURL == !optionalURLRegex) {
    223222        *errorString = "Either url or urlRegex must be specified.";
     
    263262}
    264263
    265 void InspectorDebuggerAgent::setBreakpoint(ErrorString* errorString, const RefPtr<InspectorObject>& location, const String* const optionalCondition, String* outBreakpointId, RefPtr<InspectorObject>& actualLocation)
     264void InspectorDebuggerAgent::setBreakpoint(ErrorString* errorString, const RefPtr<InspectorObject>& location, const String* const optionalCondition, TypeBuilder::Debugger::BreakpointId* outBreakpointId, RefPtr<TypeBuilder::Debugger::Location>& actualLocation)
    266265{
    267266    String scriptId;
     
    355354}
    356355
    357 void InspectorDebuggerAgent::searchInContent(ErrorString* error, const String& scriptId, const String& query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<InspectorArray>& results)
     356void InspectorDebuggerAgent::searchInContent(ErrorString* error, const String& scriptId, const String& query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<Array<WebCore::TypeBuilder::Page::SearchMatch> >& results)
    358357{
    359358    bool isRegex = optionalIsRegex ? *optionalIsRegex : false;
     
    367366}
    368367
    369 void InspectorDebuggerAgent::setScriptSource(ErrorString* error, const String& scriptId, const String& newContent, const bool* const preview, RefPtr<InspectorArray>& newCallFrames, RefPtr<InspectorObject>& result)
     368void InspectorDebuggerAgent::setScriptSource(ErrorString* error, const String& scriptId, const String& newContent, const bool* const preview, RefPtr<Array<TypeBuilder::Debugger::CallFrame> >& newCallFrames, RefPtr<InspectorObject>& result)
    370369{
    371370    bool previewOnly = preview && *preview;
     
    388387}
    389388
    390 void InspectorDebuggerAgent::getFunctionDetails(ErrorString* errorString, const String& functionId, RefPtr<InspectorObject>& detailsRaw)
     389void InspectorDebuggerAgent::getFunctionDetails(ErrorString* errorString, const String& functionId, RefPtr<TypeBuilder::Debugger::FunctionDetails>& details)
    391390{
    392391    InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(functionId);
     
    395394        return;
    396395    }
    397     RefPtr<FunctionDetails> details;
    398396    injectedScript.getFunctionDetails(errorString, functionId, &details);
    399     detailsRaw = details;
    400 }
    401 
    402 void InspectorDebuggerAgent::schedulePauseOnNextStatement(const String& breakReason, PassRefPtr<InspectorObject> data)
     397}
     398
     399void InspectorDebuggerAgent::schedulePauseOnNextStatement(InspectorFrontend::Debugger::Reason::Enum breakReason, PassRefPtr<InspectorObject> data)
    403400{
    404401    if (m_javaScriptPauseScheduled)
     
    480477}
    481478
    482 void InspectorDebuggerAgent::evaluateOnCallFrame(ErrorString* errorString, const String& callFrameId, const String& expression, const String* const objectGroup, const bool* const includeCommandLineAPI, const bool* const returnByValue, RefPtr<InspectorObject>& resultRaw, bool* wasThrown)
     479void InspectorDebuggerAgent::evaluateOnCallFrame(ErrorString* errorString, const String& callFrameId, const String& expression, const String* const objectGroup, const bool* const includeCommandLineAPI, const bool* const returnByValue, RefPtr<TypeBuilder::Runtime::RemoteObject>& result, TypeBuilder::OptOutput<bool>* wasThrown)
    483480{
    484481    InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(callFrameId);
     
    487484        return;
    488485    }
    489     RefPtr<RemoteObject> result;
    490486    injectedScript.evaluateOnCallFrame(errorString, m_currentCallStack, callFrameId, expression, objectGroup ? *objectGroup : "", includeCommandLineAPI ? *includeCommandLineAPI : false, returnByValue ? *returnByValue : false, &result, wasThrown);
    491     resultRaw = result;
    492487}
    493488
     
    573568        InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(scriptState);
    574569        if (!injectedScript.hasNoValue()) {
    575             m_breakReason = "exception";
     570            m_breakReason = InspectorFrontend::Debugger::Reason::Exception;
    576571            m_breakAuxData = injectedScript.wrapObject(exception, "backtrace");
    577572        }
     
    595590}
    596591
    597 void InspectorDebuggerAgent::breakProgram(const String& breakReason, PassRefPtr<InspectorObject> data)
     592void InspectorDebuggerAgent::breakProgram(InspectorFrontend::Debugger::Reason::Enum breakReason, PassRefPtr<InspectorObject> data)
    598593{
    599594    m_breakReason = breakReason;
     
    624619void InspectorDebuggerAgent::clearBreakDetails()
    625620{
    626     m_breakReason = "other";
     621    m_breakReason = InspectorFrontend::Debugger::Reason::Other;
    627622    m_breakAuxData = 0;
    628623}
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h

    r110678 r111005  
    8383    virtual void setBreakpointsActive(ErrorString*, bool active);
    8484
    85     virtual void setBreakpointByUrl(ErrorString*, int lineNumber, const String* optionalURL, const String* optionalURLRegex, const int* optionalColumnNumber, const String* optionalCondition, String* breakpointId, RefPtr<InspectorArray>& locations);
    86     virtual void setBreakpoint(ErrorString*, const RefPtr<InspectorObject>& location, const String* optionalCondition, String* breakpointId, RefPtr<InspectorObject>& actualLocation);
     85    virtual void setBreakpointByUrl(ErrorString*, int lineNumber, const String* optionalURL, const String* optionalURLRegex, const int* optionalColumnNumber, const String* optionalCondition, TypeBuilder::Debugger::BreakpointId*, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::Location> >& locations);
     86    virtual void setBreakpoint(ErrorString*, const RefPtr<InspectorObject>& location, const String* optionalCondition, TypeBuilder::Debugger::BreakpointId*, RefPtr<TypeBuilder::Debugger::Location>& actualLocation);
    8787    virtual void removeBreakpoint(ErrorString*, const String& breakpointId);
    8888    virtual void continueToLocation(ErrorString*, const RefPtr<InspectorObject>& location);
    8989
    90     virtual void searchInContent(ErrorString*, const String& scriptId, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<InspectorArray>&);
    91     virtual void setScriptSource(ErrorString*, const String& scriptId, const String& newContent, const bool* preview, RefPtr<InspectorArray>& newCallFrames, RefPtr<InspectorObject>& result);
     90    virtual void searchInContent(ErrorString*, const String& scriptId, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch> >&);
     91    virtual void setScriptSource(ErrorString*, const String& scriptId, const String& newContent, const bool* preview, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame> >& newCallFrames, RefPtr<InspectorObject>& result);
    9292    virtual void getScriptSource(ErrorString*, const String& scriptId, String* scriptSource);
    93     virtual void getFunctionDetails(ErrorString*, const String& functionId, RefPtr<InspectorObject>& details);
    94     void schedulePauseOnNextStatement(const String& breakReason, PassRefPtr<InspectorObject> data);
     93    virtual void getFunctionDetails(ErrorString*, const String& functionId, RefPtr<TypeBuilder::Debugger::FunctionDetails>&);
     94    void schedulePauseOnNextStatement(InspectorFrontend::Debugger::Reason::Enum breakReason, PassRefPtr<InspectorObject> data);
    9595    void cancelPauseOnNextStatement();
    96     void breakProgram(const String& breakReason, PassRefPtr<InspectorObject> data);
     96    void breakProgram(InspectorFrontend::Debugger::Reason::Enum breakReason, PassRefPtr<InspectorObject> data);
    9797    virtual void pause(ErrorString*);
    9898    virtual void resume(ErrorString*);
     
    107107                             const bool* includeCommandLineAPI,
    108108                             const bool* returnByValue,
    109                              RefPtr<InspectorObject>& result,
    110                              bool* wasThrown);
     109                             RefPtr<TypeBuilder::Runtime::RemoteObject>& result,
     110                             TypeBuilder::OptOutput<bool>* wasThrown);
    111111
    112112    class Listener {
     
    157157    BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpointIds;
    158158    String m_continueToLocationBreakpointId;
    159     String m_breakReason;
     159    InspectorFrontend::Debugger::Reason::Enum m_breakReason;
    160160    RefPtr<InspectorObject> m_breakAuxData;
    161161    bool m_javaScriptPauseScheduled;
  • trunk/Source/WebCore/inspector/InspectorPageAgent.cpp

    r110854 r111005  
    396396}
    397397
    398 static PassRefPtr<InspectorObject> buildObjectForCookie(const Cookie& cookie)
    399 {
    400     RefPtr<InspectorObject> value = InspectorObject::create();
    401     value->setString("name", cookie.name);
    402     value->setString("value", cookie.value);
    403     value->setString("domain", cookie.domain);
    404     value->setString("path", cookie.path);
    405     value->setNumber("expires", cookie.expires);
    406     value->setNumber("size", (cookie.name.length() + cookie.value.length()));
    407     value->setBoolean("httpOnly", cookie.httpOnly);
    408     value->setBoolean("secure", cookie.secure);
    409     value->setBoolean("session", cookie.session);
    410     return value;
    411 }
    412 
    413 static PassRefPtr<InspectorArray> buildArrayForCookies(ListHashSet<Cookie>& cookiesList)
    414 {
    415     RefPtr<InspectorArray> cookies = InspectorArray::create();
     398static PassRefPtr<TypeBuilder::Page::Cookie> buildObjectForCookie(const Cookie& cookie)
     399{
     400    return TypeBuilder::Page::Cookie::create()
     401        .setName(cookie.name)
     402        .setValue(cookie.value)
     403        .setDomain(cookie.domain)
     404        .setPath(cookie.path)
     405        .setExpires(cookie.expires)
     406        .setSize((cookie.name.length() + cookie.value.length()))
     407        .setHttpOnly(cookie.httpOnly)
     408        .setSecure(cookie.secure)
     409        .setSession(cookie.session);
     410}
     411
     412static PassRefPtr<TypeBuilder::Array<TypeBuilder::Page::Cookie> > buildArrayForCookies(ListHashSet<Cookie>& cookiesList)
     413{
     414    RefPtr<TypeBuilder::Array<TypeBuilder::Page::Cookie> > cookies = TypeBuilder::Array<TypeBuilder::Page::Cookie>::create();
    416415
    417416    ListHashSet<Cookie>::iterator end = cookiesList.end();
    418417    ListHashSet<Cookie>::iterator it = cookiesList.begin();
    419418    for (int i = 0; it != end; ++it, i++)
    420         cookies->pushObject(buildObjectForCookie(*it));
     419        cookies->addItem(buildObjectForCookie(*it));
    421420
    422421    return cookies;
     
    467466}
    468467
    469 void InspectorPageAgent::getCookies(ErrorString*, RefPtr<InspectorArray>& cookies, WTF::String* cookiesString)
     468void InspectorPageAgent::getCookies(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Page::Cookie> >& cookies, WTF::String* cookiesString)
    470469{
    471470    // If we can get raw cookies.
     
    503502    }
    504503
    505     if (rawCookiesImplemented)
     504    // FIXME: Do not return empty string/empty array. Make returns optional instead. https://bugs.webkit.org/show_bug.cgi?id=80855
     505    if (rawCookiesImplemented) {
    506506        cookies = buildArrayForCookies(rawCookiesList);
    507     else
     507        *cookiesString = "";
     508    } else {
     509        cookies = TypeBuilder::Array<TypeBuilder::Page::Cookie>::create();
    508510        *cookiesString = stringCookiesList;
     511    }
    509512}
    510513
     
    522525}
    523526
    524 void InspectorPageAgent::getResourceTree(ErrorString*, RefPtr<InspectorObject>& object)
     527void InspectorPageAgent::getResourceTree(ErrorString*, RefPtr<TypeBuilder::Page::FrameResourceTree>& object)
    525528{
    526529    object = buildObjectForFrameTree(m_page->mainFrame());
     
    549552}
    550553
    551 void InspectorPageAgent::searchInResource(ErrorString*, const String& frameId, const String& url, const String& query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<InspectorArray>& results)
    552 {
    553     results = InspectorArray::create();
     554void InspectorPageAgent::searchInResource(ErrorString*, const String& frameId, const String& url, const String& query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch> >& results)
     555{
     556    results = TypeBuilder::Array<TypeBuilder::Page::SearchMatch>::create();
    554557
    555558    bool isRegex = optionalIsRegex ? *optionalIsRegex : false;
     
    591594}
    592595
    593 void InspectorPageAgent::searchInResources(ErrorString*, const String& text, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<InspectorArray>& results)
    594 {
    595     RefPtr<InspectorArray> searchResults = InspectorArray::create();
     596void InspectorPageAgent::searchInResources(ErrorString*, const String& text, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchResult> >& results)
     597{
     598    RefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchResult> > searchResults = TypeBuilder::Array<TypeBuilder::Page::SearchResult>::create();
    596599
    597600    bool isRegex = optionalIsRegex ? *optionalIsRegex : false;
     
    818821}
    819822
    820 PassRefPtr<InspectorObject> InspectorPageAgent::buildObjectForFrame(Frame* frame)
    821 {
    822     RefPtr<InspectorObject> frameObject = InspectorObject::create();
    823     frameObject->setString("id", frameId(frame));
     823PassRefPtr<TypeBuilder::Page::Frame> InspectorPageAgent::buildObjectForFrame(Frame* frame)
     824{
     825    RefPtr<TypeBuilder::Page::Frame> frameObject = TypeBuilder::Page::Frame::create()
     826         .setId(frameId(frame))
     827         .setLoaderId(loaderId(frame->loader()->documentLoader()))
     828         .setUrl(frame->document()->url().string())
     829         .setMimeType(frame->loader()->documentLoader()->responseMIMEType());
    824830    if (frame->tree()->parent())
    825         frameObject->setString("parentId", frameId(frame->tree()->parent()));
     831        frameObject->setParentId(frameId(frame->tree()->parent()));
    826832    if (frame->ownerElement()) {
    827833        String name = frame->ownerElement()->getNameAttribute();
    828834        if (name.isEmpty())
    829835            name = frame->ownerElement()->getAttribute(HTMLNames::idAttr);
    830         frameObject->setString("name", name);
    831     }
    832     frameObject->setString("url", frame->document()->url().string());
    833     frameObject->setString("loaderId", loaderId(frame->loader()->documentLoader()));
    834     frameObject->setString("securityOrigin", frame->document()->securityOrigin()->toString());
    835     frameObject->setString("mimeType", frame->loader()->documentLoader()->responseMIMEType());
     836        frameObject->setName(name);
     837    }
     838    // FIXME: Make this field non-optional. https://bugs.webkit.org/show_bug.cgi?id=80857
     839    frameObject->setSecurityOrigin(frame->document()->securityOrigin()->toString());
    836840
    837841    return frameObject;
    838842}
    839843
    840 PassRefPtr<InspectorObject> InspectorPageAgent::buildObjectForFrameTree(Frame* frame)
    841 {
    842     RefPtr<InspectorObject> result = InspectorObject::create();
     844PassRefPtr<TypeBuilder::Page::FrameResourceTree> InspectorPageAgent::buildObjectForFrameTree(Frame* frame)
     845{
    843846    RefPtr<InspectorObject> frameObject = buildObjectForFrame(frame);
    844     result->setObject("frame", frameObject);
    845 
    846847    RefPtr<InspectorArray> subresources = InspectorArray::create();
    847     result->setArray("resources", subresources);
     848    RefPtr<TypeBuilder::Page::FrameResourceTree> result = TypeBuilder::Page::FrameResourceTree::create()
     849         .setFrame(frameObject)
     850         .setResources(subresources);
    848851
    849852    Vector<CachedResource*> allResources = cachedResourcesForFrame(frame);
  • trunk/Source/WebCore/inspector/InspectorPageAgent.h

    r110678 r111005  
    9696    virtual void reload(ErrorString*, const bool* optionalIgnoreCache, const String* optionalScriptToEvaluateOnLoad);
    9797    virtual void navigate(ErrorString*, const String& url);
    98     virtual void getCookies(ErrorString*, RefPtr<InspectorArray>& cookies, WTF::String* cookiesString);
     98    virtual void getCookies(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Page::Cookie> >& cookies, WTF::String* cookiesString);
    9999    virtual void deleteCookie(ErrorString*, const String& cookieName, const String& domain);
    100     virtual void getResourceTree(ErrorString*, RefPtr<InspectorObject>&);
     100    virtual void getResourceTree(ErrorString*, RefPtr<TypeBuilder::Page::FrameResourceTree>&);
    101101    virtual void getResourceContent(ErrorString*, const String& frameId, const String& url, String* content, bool* base64Encoded);
    102     virtual void searchInResource(ErrorString*, const String& frameId, const String& url, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<InspectorArray>&);
    103     virtual void searchInResources(ErrorString*, const String&, const bool* caseSensitive, const bool* isRegex, RefPtr<InspectorArray>&);
     102    virtual void searchInResource(ErrorString*, const String& frameId, const String& url, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch> >&);
     103    virtual void searchInResources(ErrorString*, const String&, const bool* caseSensitive, const bool* isRegex, RefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchResult> >&);
    104104    virtual void setDocumentContent(ErrorString*, const String& frameId, const String& html);
    105105    virtual void setScreenSizeOverride(ErrorString*, int width, int height);
     
    138138    void clearFrameViewFixedLayout();
    139139
    140     PassRefPtr<InspectorObject> buildObjectForFrame(Frame*);
    141     PassRefPtr<InspectorObject> buildObjectForFrameTree(Frame*);
     140    PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(Frame*);
     141    PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Frame*);
    142142    Page* m_page;
    143143    InjectedScriptManager* m_injectedScriptManager;
  • trunk/Source/WebCore/inspector/InspectorRuntimeAgent.cpp

    r110854 r111005  
    9999#endif
    100100
    101     injectedScript.evaluate(errorString, expression, objectGroup ? *objectGroup : "", asBool(includeCommandLineAPI), asBool(returnByValue), &result, wasThrown);
     101    TypeBuilder::OptOutput<bool> wasThrownOpt;
     102    injectedScript.evaluate(errorString, expression, objectGroup ? *objectGroup : "", asBool(includeCommandLineAPI), asBool(returnByValue), &result, &wasThrownOpt);
     103    *wasThrown = wasThrownOpt.isAssigned() ? wasThrownOpt.getValue() : false;
    102104
    103105#if ENABLE(JAVASCRIPT_DEBUGGER)
     
    117119    if (optionalArguments)
    118120        arguments = (*optionalArguments)->toJSONString();
    119     injectedScript.callFunctionOn(errorString, objectId, expression, arguments, asBool(returnByValue), &result, wasThrown);
     121
     122    TypeBuilder::OptOutput<bool> wasThrownOpt;
     123    injectedScript.callFunctionOn(errorString, objectId, expression, arguments, asBool(returnByValue), &result, &wasThrownOpt);
     124    *wasThrown = wasThrownOpt.isAssigned() ? wasThrownOpt.getValue() : false;
    120125}
    121126
Note: See TracChangeset for help on using the changeset viewer.