Changeset 107368 in webkit


Ignore:
Timestamp:
Feb 9, 2012 11:38:15 PM (12 years ago)
Author:
haraken@chromium.org
Message:

Replace [CustomArgumentHandling] with [CallWith=ScriptArguments|CallStack]
https://bugs.webkit.org/show_bug.cgi?id=78327

Reviewed by Adam Barth.

This patch replaces [CustomArgumentHandling] with [CallWith=ScriptArguments|CallStack],
and removes [CustomArgumentHandling].

Test: bindings/scripts/test/TestObj.idl

  • bindings/scripts/CodeGeneratorJS.pm: Modified to replace

[CustomArgumentHandling] with [CallWith=ScriptArguments|CallStack].
(GenerateCallWith):
(GenerateParametersCheck):

  • bindings/scripts/CodeGeneratorV8.pm: Ditto.

(GenerateCallWith):

  • bindings/scripts/CodeGeneratorCPP.pm: Simply removed [CustomArgumentHandling]

from the skipped list. By this fix, CodeGeneratorCPP.pm will generate
meaningless code for attributes or methods which was previously marked as
[CustomArgumentHandling], but this change will be harmless.
(ShouldSkipType):

  • bindings/scripts/CodeGeneratorGObject.pm: Ditto.

(SkipFunction):
(GenerateFunction):

  • bindings/v8/custom/V8ConsoleCustom.cpp: Changed the argument order.

(WebCore::V8Console::assertCallback):

  • page/Console.cpp: Ditto.

(WebCore::Console::assertCondition):
(WebCore::Console::timeEnd):

  • page/Console.h: Ditto.

(Console):

  • bindings/scripts/test/TestObj.idl: Added test cases for [CallWith=ScriptArguments|CallStack].
  • bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated run-bindings-tests results.

(WebDOMTestObj::withScriptArgumentsAndCallStackAttribute):
(WebDOMTestObj::setWithScriptArgumentsAndCallStackAttribute):
(WebDOMTestObj::withScriptArgumentsAndCallStack):

  • bindings/scripts/test/CPP/WebDOMTestObj.h:
  • bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:

(webkit_dom_test_obj_with_script_arguments_and_call_stack):
(webkit_dom_test_obj_get_with_script_arguments_and_call_stack_attribute):
(webkit_dom_test_obj_set_with_script_arguments_and_call_stack_attribute):
(webkit_dom_test_obj_get_property):
(webkit_dom_test_obj_class_init):

  • bindings/scripts/test/GObject/WebKitDOMTestObj.h:
  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore):
(WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
(WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
(WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):

  • bindings/scripts/test/JS/JSTestObj.h:

(WebCore):

  • bindings/scripts/test/ObjC/DOMTestObj.h:
  • bindings/scripts/test/ObjC/DOMTestObj.mm:

(-[DOMTestObj withScriptArgumentsAndCallStackAttribute]):
(-[DOMTestObj setWithScriptArgumentsAndCallStackAttribute:]):
(-[DOMTestObj withScriptArgumentsAndCallStack]):

  • bindings/scripts/test/V8/V8TestObj.cpp:

(WebCore::TestObjInternal::withScriptArgumentsAndCallStackAttributeAttrGetter):
(TestObjInternal):
(WebCore::TestObjInternal::withScriptArgumentsAndCallStackAttributeAttrSetter):
(WebCore::TestObjInternal::withScriptArgumentsAndCallStackCallback):
(WebCore):
(WebCore::ConfigureV8TestObjTemplate):

Location:
trunk/Source/WebCore
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r107367 r107368  
     12012-02-09  Kentaro Hara  <haraken@chromium.org>
     2
     3        Replace [CustomArgumentHandling] with [CallWith=ScriptArguments|CallStack]
     4        https://bugs.webkit.org/show_bug.cgi?id=78327
     5
     6        Reviewed by Adam Barth.
     7
     8        This patch replaces [CustomArgumentHandling] with [CallWith=ScriptArguments|CallStack],
     9        and removes [CustomArgumentHandling].
     10
     11        Test: bindings/scripts/test/TestObj.idl
     12
     13        * bindings/scripts/CodeGeneratorJS.pm: Modified to replace
     14        [CustomArgumentHandling] with [CallWith=ScriptArguments|CallStack].
     15        (GenerateCallWith):
     16        (GenerateParametersCheck):
     17        * bindings/scripts/CodeGeneratorV8.pm: Ditto.
     18        (GenerateCallWith):
     19        * bindings/scripts/CodeGeneratorCPP.pm: Simply removed [CustomArgumentHandling]
     20        from the skipped list. By this fix, CodeGeneratorCPP.pm will generate
     21        meaningless code for attributes or methods which was previously marked as
     22        [CustomArgumentHandling], but this change will be harmless.
     23        (ShouldSkipType):
     24        * bindings/scripts/CodeGeneratorGObject.pm: Ditto.
     25        (SkipFunction):
     26        (GenerateFunction):
     27
     28        * bindings/v8/custom/V8ConsoleCustom.cpp: Changed the argument order.
     29        (WebCore::V8Console::assertCallback):
     30        * page/Console.cpp: Ditto.
     31        (WebCore::Console::assertCondition):
     32        (WebCore::Console::timeEnd):
     33        * page/Console.h: Ditto.
     34        (Console):
     35
     36        * bindings/scripts/test/TestObj.idl: Added test cases for [CallWith=ScriptArguments|CallStack].
     37
     38        * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated run-bindings-tests results.
     39        (WebDOMTestObj::withScriptArgumentsAndCallStackAttribute):
     40        (WebDOMTestObj::setWithScriptArgumentsAndCallStackAttribute):
     41        (WebDOMTestObj::withScriptArgumentsAndCallStack):
     42        * bindings/scripts/test/CPP/WebDOMTestObj.h:
     43        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
     44        (webkit_dom_test_obj_with_script_arguments_and_call_stack):
     45        (webkit_dom_test_obj_get_with_script_arguments_and_call_stack_attribute):
     46        (webkit_dom_test_obj_set_with_script_arguments_and_call_stack_attribute):
     47        (webkit_dom_test_obj_get_property):
     48        (webkit_dom_test_obj_class_init):
     49        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
     50        * bindings/scripts/test/JS/JSTestObj.cpp:
     51        (WebCore):
     52        (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
     53        (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
     54        (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
     55        * bindings/scripts/test/JS/JSTestObj.h:
     56        (WebCore):
     57        * bindings/scripts/test/ObjC/DOMTestObj.h:
     58        * bindings/scripts/test/ObjC/DOMTestObj.mm:
     59        (-[DOMTestObj withScriptArgumentsAndCallStackAttribute]):
     60        (-[DOMTestObj setWithScriptArgumentsAndCallStackAttribute:]):
     61        (-[DOMTestObj withScriptArgumentsAndCallStack]):
     62        * bindings/scripts/test/V8/V8TestObj.cpp:
     63        (WebCore::TestObjInternal::withScriptArgumentsAndCallStackAttributeAttrGetter):
     64        (TestObjInternal):
     65        (WebCore::TestObjInternal::withScriptArgumentsAndCallStackAttributeAttrSetter):
     66        (WebCore::TestObjInternal::withScriptArgumentsAndCallStackCallback):
     67        (WebCore):
     68        (WebCore::ConfigureV8TestObjTemplate):
     69
    1702012-02-09  Adam Barth  <abarth@webkit.org>
    271
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm

    r107299 r107368  
    192192    my $typeInfo = shift;
    193193
    194     return 1 if $typeInfo->signature->extendedAttributes->{"Custom"};
    195 
    196     return 1 if $typeInfo->signature->extendedAttributes->{"CustomArgumentHandling"}
    197              or $typeInfo->signature->extendedAttributes->{"CustomGetter"}
    198              or $typeInfo->signature->extendedAttributes->{"CPPCustom"};
     194    return 1 if $typeInfo->signature->extendedAttributes->{"Custom"}
     195                or $typeInfo->signature->extendedAttributes->{"CustomGetter"}
     196                or $typeInfo->signature->extendedAttributes->{"CPPCustom"};
    199197
    200198    # FIXME: We don't generate bindings for SVG related interfaces yet
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm

    r107299 r107368  
    189189
    190190    my $functionName = "webkit_dom_" . $decamelize . "_" . $prefix . decamelize($function->signature->name);
    191     my $isCustomFunction = $function->signature->extendedAttributes->{"Custom"} ||
    192         $function->signature->extendedAttributes->{"CustomArgumentHandling"};
     191    my $isCustomFunction = $function->signature->extendedAttributes->{"Custom"};
    193192
    194193    if ($isCustomFunction &&
     
    738737
    739738    my @callImplParams;
    740 
    741     # skip some custom functions for now
    742     my $isCustomFunction = $function->signature->extendedAttributes->{"Custom"} ||
    743                        $function->signature->extendedAttributes->{"CustomArgumentHandling"};
    744739
    745740    foreach my $param (@{$function->parameters}) {
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r107314 r107368  
    23332333    my $outputArray = shift;
    23342334    my $returnValue = shift;
     2335    my $function = shift;
    23352336
    23362337    my @callWithArgs;
     
    23432344        push(@$outputArray, "        return" . ($returnValue ? " " . $returnValue : "") . ";\n");
    23442345        push(@callWithArgs, "scriptContext");
     2346    }
     2347    if ($function and $codeGenerator->ExtendedAttributeContains($callWith, "ScriptArguments")) {
     2348        push(@$outputArray, "    RefPtr<ScriptArguments> scriptArguments(createScriptArguments(exec, " . @{$function->parameters} . "));\n");
     2349        $implIncludes{"ScriptArguments.h"} = 1;
     2350        push(@callWithArgs, "scriptArguments");
     2351    }
     2352    if ($codeGenerator->ExtendedAttributeContains($callWith, "CallStack")) {
     2353        push(@$outputArray, "    RefPtr<ScriptCallStack> callStack(createScriptCallStackForInspector(exec));\n");
     2354        $implIncludes{"ScriptCallStack.h"} = 1;
     2355        $implIncludes{"ScriptCallStackFactory.h"} = 1;
     2356        push(@callWithArgs, "callStack");
    23452357    }
    23462358    return @callWithArgs;
     
    23982410    }
    23992411
    2400     if ($function->signature->extendedAttributes->{"CustomArgumentHandling"} and !$function->isStatic) {
    2401         push(@$outputArray, "    RefPtr<ScriptArguments> scriptArguments(createScriptArguments(exec, $numParameters));\n");
    2402         push(@$outputArray, "    RefPtr<ScriptCallStack> callStack(createScriptCallStackForInspector(exec));\n");
    2403         $implIncludes{"ScriptArguments.h"} = 1;
    2404         $implIncludes{"ScriptCallStack.h"} = 1;
    2405         $implIncludes{"ScriptCallStackFactory.h"} = 1;
    2406     }
    2407 
    24082412    if (!$function->signature->extendedAttributes->{"Constructor"}) {
    2409         push(@arguments, GenerateCallWith($function->signature->extendedAttributes->{"CallWith"}, \@$outputArray, "JSValue::encode(jsUndefined())"));
     2413        push(@arguments, GenerateCallWith($function->signature->extendedAttributes->{"CallWith"}, \@$outputArray, "JSValue::encode(jsUndefined())", $function));
    24102414    }
    24112415
     
    24262430
    24272431            my @optionalCallbackArguments = @arguments;
    2428             if ($function->signature->extendedAttributes->{"CustomArgumentHandling"}) {
    2429                 push @optionalCallbackArguments, "scriptArguments, callStack";
    2430             }
    24312432            if (@{$function->raisesExceptions}) {
    24322433                push @optionalCallbackArguments, "ec";
     
    25232524    }
    25242525
    2525     if ($function->signature->extendedAttributes->{"CustomArgumentHandling"}) {
    2526         push @arguments, "scriptArguments, callStack";
    2527     }
    25282526    if (@{$function->raisesExceptions}) {
    25292527        push @arguments, "ec";
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm

    r107367 r107368  
    13621362END
    13631363
    1364     my $numParameters = @{$function->parameters};
    1365 
    13661364    push(@implContentDecls, GenerateArgumentsCountCheck($function, $dataNode));
    13671365
     
    14181416    }
    14191417
    1420     if ($function->signature->extendedAttributes->{"CustomArgumentHandling"}) {
    1421         push(@implContentDecls, <<END);
    1422     RefPtr<ScriptArguments> scriptArguments(createScriptArguments(args, $numParameters));
    1423     RefPtr<ScriptCallStack> callStack(createScriptCallStackForInspector());
    1424     if (!callStack)
    1425         return v8::Undefined();
    1426 END
    1427         AddToImplIncludes("ScriptArguments.h");
    1428         AddToImplIncludes("ScriptCallStack.h");
    1429         AddToImplIncludes("ScriptCallStackFactory.h");
    1430     }
    14311418    if ($function->signature->extendedAttributes->{"CheckAccessToNode"}) {
    14321419        push(@implContentDecls, "    if (!V8BindingSecurity::shouldAllowAccessToNode(V8BindingState::Only(), imp->" . $function->signature->name . "(ec)))\n");
     
    14601447    my $returnVoid = shift;
    14611448    my $emptyContext = shift;
     1449    my $function = shift;
    14621450
    14631451    my @callWithArgs;
     
    14781466        push(@$outputArray, $indent . "    return" . ($returnVoid ? "" : " v8::Undefined()") . ";\n");
    14791467        push(@callWithArgs, "scriptContext");
     1468    }
     1469    if ($function and $codeGenerator->ExtendedAttributeContains($callWith, "ScriptArguments")) {
     1470        push(@$outputArray, $indent . "RefPtr<ScriptArguments> scriptArguments(createScriptArguments(args, " . @{$function->parameters} . "));\n");
     1471        push(@callWithArgs, "scriptArguments");
     1472        AddToImplIncludes("ScriptArguments.h");
     1473    }
     1474    if ($codeGenerator->ExtendedAttributeContains($callWith, "CallStack")) {
     1475        push(@$outputArray, $indent . "RefPtr<ScriptCallStack> callStack(createScriptCallStackForInspector());\n");
     1476        push(@$outputArray, $indent . "if (!callStack)\n");
     1477        push(@$outputArray, $indent . "    return v8::Undefined();\n");
     1478        push(@callWithArgs, "callStack");
     1479        AddToImplIncludes("ScriptCallStack.h");
     1480        AddToImplIncludes("ScriptCallStackFactory.h");
    14801481    }
    14811482    return @callWithArgs;
     
    31973198    my $callWith = $function->signature->extendedAttributes->{"CallWith"};
    31983199    my @callWithOutput = ();
    3199     my @callWithArgs = GenerateCallWith($callWith, \@callWithOutput, $indent, 0, 1);
     3200    my @callWithArgs = GenerateCallWith($callWith, \@callWithOutput, $indent, 0, 1, $function);
    32003201    $result .= join("", @callWithOutput);
    32013202    push(@arguments, @callWithArgs);
     
    32243225        }
    32253226        $index++;
    3226     }
    3227 
    3228     if ($function->signature->extendedAttributes->{"CustomArgumentHandling"}) {
    3229         push @arguments, "scriptArguments, callStack";
    32303227    }
    32313228
  • trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp

    r107314 r107368  
    615615}
    616616
     617WebDOMTestObj WebDOMTestObj::withScriptArgumentsAndCallStackAttribute() const
     618{
     619    if (!impl())
     620        return WebDOMTestObj();
     621
     622    return toWebKit(WTF::getPtr(impl()->withScriptArgumentsAndCallStackAttribute()));
     623}
     624
     625void WebDOMTestObj::setWithScriptArgumentsAndCallStackAttribute(const WebDOMTestObj& newWithScriptArgumentsAndCallStackAttribute)
     626{
     627    if (!impl())
     628        return;
     629
     630    impl()->setWithScriptArgumentsAndCallStackAttribute(toWebCore(newWithScriptArgumentsAndCallStackAttribute));
     631}
     632
    617633WebDOMString WebDOMTestObj::scriptStringAttr() const
    618634{
     
    10001016}
    10011017
     1018void WebDOMTestObj::withScriptArgumentsAndCallStack()
     1019{
     1020    if (!impl())
     1021        return;
     1022
     1023    impl()->withScriptArgumentsAndCallStack();
     1024}
     1025
    10021026void WebDOMTestObj::methodWithOptionalArg(int opt)
    10031027{
  • trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h

    r107314 r107368  
    135135    WebDOMTestObj withScriptExecutionContextAndScriptStateWithSpacesAttribute() const;
    136136    void setWithScriptExecutionContextAndScriptStateWithSpacesAttribute(const WebDOMTestObj&);
     137    WebDOMTestObj withScriptArgumentsAndCallStackAttribute() const;
     138    void setWithScriptArgumentsAndCallStackAttribute(const WebDOMTestObj&);
    137139    WebDOMString scriptStringAttr() const;
    138140#if ENABLE(Condition1)
     
    193195    WebDOMTestObj withScriptExecutionContextAndScriptStateObjException();
    194196    WebDOMTestObj withScriptExecutionContextAndScriptStateWithSpaces();
     197    void withScriptArgumentsAndCallStack();
    195198    void methodWithOptionalArg(int opt);
    196199    void methodWithNonOptionalArgAndOptionalArg(int nonOpt, int opt);
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp

    r107314 r107368  
    345345
    346346void
     347webkit_dom_test_obj_with_script_arguments_and_call_stack(WebKitDOMTestObj* self)
     348{
     349    g_return_if_fail(self);
     350    WebCore::JSMainThreadNullState state;
     351    WebCore::TestObj * item = WebKit::core(self);
     352    item->withScriptArgumentsAndCallStack();
     353}
     354
     355void
    347356webkit_dom_test_obj_method_with_optional_arg(WebKitDOMTestObj* self, glong opt)
    348357{
     
    13131322    }
    13141323    item->setWithScriptExecutionContextAndScriptStateWithSpacesAttribute(converted_value);
     1324}
     1325
     1326WebKitDOMTestObj*
     1327webkit_dom_test_obj_get_with_script_arguments_and_call_stack_attribute(WebKitDOMTestObj* self)
     1328{
     1329    g_return_val_if_fail(self, 0);
     1330    WebCore::JSMainThreadNullState state;
     1331    WebCore::TestObj * item = WebKit::core(self);
     1332    PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptArgumentsAndCallStackAttribute());
     1333    WebKitDOMTestObj* res = WebKit::kit(g_res.get());
     1334    return res;
     1335}
     1336
     1337void
     1338webkit_dom_test_obj_set_with_script_arguments_and_call_stack_attribute(WebKitDOMTestObj* self, WebKitDOMTestObj* value)
     1339{
     1340    g_return_if_fail(self);
     1341    WebCore::JSMainThreadNullState state;
     1342    WebCore::TestObj * item = WebKit::core(self);
     1343    g_return_if_fail(value);
     1344    WebCore::TestObj * converted_value = NULL;
     1345    if (value != NULL) {
     1346        converted_value = WebKit::core(value);
     1347        g_return_if_fail(converted_value);
     1348    }
     1349    item->setWithScriptArgumentsAndCallStackAttribute(converted_value);
    13151350}
    13161351
     
    15711606    PROP_WITH_SCRIPT_EXECUTION_CONTEXT_AND_SCRIPT_STATE_ATTRIBUTE_RAISES,
    15721607    PROP_WITH_SCRIPT_EXECUTION_CONTEXT_AND_SCRIPT_STATE_WITH_SPACES_ATTRIBUTE,
     1608    PROP_WITH_SCRIPT_ARGUMENTS_AND_CALL_STACK_ATTRIBUTE,
    15731609    PROP_SCRIPT_STRING_ATTR,
    15741610#if ENABLE(Condition1)
     
    19301966        break;
    19311967    }
     1968    case PROP_WITH_SCRIPT_ARGUMENTS_AND_CALL_STACK_ATTRIBUTE:
     1969    {
     1970        RefPtr<WebCore::TestObj> ptr = coreSelf->withScriptArgumentsAndCallStackAttribute();
     1971        g_value_set_object(value, WebKit::kit(ptr.get()));
     1972        break;
     1973    }
    19321974    case PROP_SCRIPT_STRING_ATTR:
    19331975    {
     
    22652307                                                           WEBKIT_PARAM_READWRITE));
    22662308    g_object_class_install_property(gobjectClass,
     2309                                    PROP_WITH_SCRIPT_ARGUMENTS_AND_CALL_STACK_ATTRIBUTE,
     2310                                    g_param_spec_object("with-script-arguments-and-call-stack-attribute", /* name */
     2311                                                           "test_obj_with-script-arguments-and-call-stack-attribute", /* short description */
     2312                                                           "read-write  WebKitDOMTestObj* TestObj.with-script-arguments-and-call-stack-attribute", /* longer - could do with some extra doc stuff here */
     2313                                                           WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
     2314                                                           WEBKIT_PARAM_READWRITE));
     2315    g_object_class_install_property(gobjectClass,
    22672316                                    PROP_SCRIPT_STRING_ATTR,
    22682317                                    g_param_spec_string("script-string-attr", /* name */
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h

    r107314 r107368  
    258258
    259259/**
     260 * webkit_dom_test_obj_with_script_arguments_and_call_stack:
     261 * @self: A #WebKitDOMTestObj
     262 *
     263 * Returns:
     264 *
     265**/
     266WEBKIT_API void
     267webkit_dom_test_obj_with_script_arguments_and_call_stack(WebKitDOMTestObj* self);
     268
     269/**
    260270 * webkit_dom_test_obj_method_with_optional_arg:
    261271 * @self: A #WebKitDOMTestObj
     
    11501160
    11511161/**
     1162 * webkit_dom_test_obj_get_with_script_arguments_and_call_stack_attribute:
     1163 * @self: A #WebKitDOMTestObj
     1164 *
     1165 * Returns: (transfer none):
     1166 *
     1167**/
     1168WEBKIT_API WebKitDOMTestObj*
     1169webkit_dom_test_obj_get_with_script_arguments_and_call_stack_attribute(WebKitDOMTestObj* self);
     1170
     1171/**
     1172 * webkit_dom_test_obj_set_with_script_arguments_and_call_stack_attribute:
     1173 * @self: A #WebKitDOMTestObj
     1174 * @value: A #WebKitDOMTestObj
     1175 *
     1176 * Returns: (transfer none):
     1177 *
     1178**/
     1179WEBKIT_API void
     1180webkit_dom_test_obj_set_with_script_arguments_and_call_stack_attribute(WebKitDOMTestObj* self, WebKitDOMTestObj* value);
     1181
     1182/**
    11521183 * webkit_dom_test_obj_get_script_string_attr:
    11531184 * @self: A #WebKitDOMTestObj
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r107314 r107368  
    4343#include "JSe.h"
    4444#include "JSint.h"
    45 #include "JSlog.h"
    4645#include "KURL.h"
    4746#include "SVGDocument.h"
     
    113112    { "withScriptExecutionContextAndScriptStateAttributeRaises", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises), (intptr_t)setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises, NoIntrinsic },
    114113    { "withScriptExecutionContextAndScriptStateWithSpacesAttribute", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute), (intptr_t)setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute, NoIntrinsic },
     114    { "withScriptArgumentsAndCallStackAttribute", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptArgumentsAndCallStackAttribute), (intptr_t)setJSTestObjWithScriptArgumentsAndCallStackAttribute, NoIntrinsic },
    115115    { "scriptStringAttr", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjScriptStringAttr), (intptr_t)0, NoIntrinsic },
    116116#if ENABLE(Condition1)
     
    262262    { "customMethod", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionCustomMethod), (intptr_t)0, NoIntrinsic },
    263263    { "customMethodWithArgs", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionCustomMethodWithArgs), (intptr_t)3, NoIntrinsic },
    264     { "customArgsAndException", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionCustomArgsAndException), (intptr_t)1, NoIntrinsic },
    265264    { "addEventListener", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionAddEventListener), (intptr_t)3, NoIntrinsic },
    266265    { "removeEventListener", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionRemoveEventListener), (intptr_t)3, NoIntrinsic },
     
    273272    { "withScriptExecutionContextAndScriptStateObjException", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException), (intptr_t)0, NoIntrinsic },
    274273    { "withScriptExecutionContextAndScriptStateWithSpaces", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces), (intptr_t)0, NoIntrinsic },
     274    { "withScriptArgumentsAndCallStack", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack), (intptr_t)0, NoIntrinsic },
    275275    { "methodWithOptionalArg", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalArg), (intptr_t)1, NoIntrinsic },
    276276    { "methodWithNonOptionalArgAndOptionalArg", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg), (intptr_t)2, NoIntrinsic },
     
    305305};
    306306
    307 static const HashTable JSTestObjPrototypeTable = { 265, 255, JSTestObjPrototypeTableValues, 0 };
     307static const HashTable JSTestObjPrototypeTable = { 266, 255, JSTestObjPrototypeTableValues, 0 };
    308308const ClassInfo JSTestObjPrototype::s_info = { "TestObjPrototype", &Base::s_info, &JSTestObjPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestObjPrototype) };
    309309
     
    703703    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
    704704    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptExecutionContextAndScriptStateWithSpacesAttribute(exec, scriptContext)));
     705    return result;
     706}
     707
     708
     709JSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* exec, JSValue slotBase, const Identifier&)
     710{
     711    JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
     712    RefPtr<ScriptCallStack> callStack(createScriptCallStackForInspector(exec));
     713    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
     714    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptArgumentsAndCallStackAttribute(callStack)));
    705715    return result;
    706716}
     
    11541164
    11551165
     1166void setJSTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* exec, JSObject* thisObject, JSValue value)
     1167{
     1168    JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
     1169    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
     1170    RefPtr<ScriptCallStack> callStack(createScriptCallStackForInspector(exec));
     1171    impl->setWithScriptArgumentsAndCallStackAttribute(callStack, toTestObj(value));
     1172}
     1173
     1174
    11561175#if ENABLE(Condition1)
    11571176void setJSTestObjConditionalAttr1(ExecState* exec, JSObject* thisObject, JSValue value)
     
    14751494}
    14761495
    1477 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomArgsAndException(ExecState* exec)
    1478 {
    1479     JSValue thisValue = exec->hostThisValue();
    1480     if (!thisValue.inherits(&JSTestObj::s_info))
    1481         return throwVMTypeError(exec);
    1482     JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
    1483     ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
    1484     TestObj* impl = static_cast<TestObj*>(castedThis->impl());
    1485     if (exec->argumentCount() < 1)
    1486         return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
    1487     ExceptionCode ec = 0;
    1488     RefPtr<ScriptArguments> scriptArguments(createScriptArguments(exec, 1));
    1489     RefPtr<ScriptCallStack> callStack(createScriptCallStackForInspector(exec));
    1490     log* intArg(tolog(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
    1491     if (exec->hadException())
    1492         return JSValue::encode(jsUndefined());
    1493     impl->customArgsAndException(intArg, scriptArguments, callStack, ec);
    1494     setDOMException(exec, ec);
    1495     return JSValue::encode(jsUndefined());
    1496 }
    1497 
    14981496EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAddEventListener(ExecState* exec)
    14991497{
     
    16541652        return JSValue::encode(jsUndefined());
    16551653    return JSValue::encode(result);
     1654}
     1655
     1656EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack(ExecState* exec)
     1657{
     1658    JSValue thisValue = exec->hostThisValue();
     1659    if (!thisValue.inherits(&JSTestObj::s_info))
     1660        return throwVMTypeError(exec);
     1661    JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
     1662    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
     1663    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
     1664    RefPtr<ScriptArguments> scriptArguments(createScriptArguments(exec, 0));
     1665    RefPtr<ScriptCallStack> callStack(createScriptCallStackForInspector(exec));
     1666    impl->withScriptArgumentsAndCallStack(scriptArguments, callStack);
     1667    return JSValue::encode(jsUndefined());
    16561668}
    16571669
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h

    r107314 r107368  
    164164JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethod(JSC::ExecState*);
    165165JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethodWithArgs(JSC::ExecState*);
    166 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomArgsAndException(JSC::ExecState*);
    167166JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAddEventListener(JSC::ExecState*);
    168167JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionRemoveEventListener(JSC::ExecState*);
     
    175174JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException(JSC::ExecState*);
    176175JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces(JSC::ExecState*);
     176JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack(JSC::ExecState*);
    177177JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArg(JSC::ExecState*);
    178178JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg(JSC::ExecState*);
     
    266266JSC::JSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
    267267void setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
     268JSC::JSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
     269void setJSTestObjWithScriptArgumentsAndCallStackAttribute(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
    268270JSC::JSValue jsTestObjScriptStringAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
    269271JSC::JSValue jsTestObjConditionalAttr1(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h

    r107314 r107368  
    4444@class DOMd;
    4545@class DOMe;
    46 @class DOMlog;
    4746@class NSString;
    4847@protocol DOMEventListener;
     
    130129- (DOMTestObj *)withScriptExecutionContextAndScriptStateWithSpacesAttribute;
    131130- (void)setWithScriptExecutionContextAndScriptStateWithSpacesAttribute:(DOMTestObj *)newWithScriptExecutionContextAndScriptStateWithSpacesAttribute;
     131- (DOMTestObj *)withScriptArgumentsAndCallStackAttribute;
     132- (void)setWithScriptArgumentsAndCallStackAttribute:(DOMTestObj *)newWithScriptArgumentsAndCallStackAttribute;
    132133- (NSString *)scriptStringAttr;
    133134#if ENABLE(Condition1)
     
    179180- (void)customMethod;
    180181- (void)customMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
    181 - (void)customArgsAndException:(DOMlog *)intArg;
    182182- (void)addEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture;
    183183- (void)removeEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture;
     
    190190- (DOMTestObj *)withScriptExecutionContextAndScriptStateObjException;
    191191- (DOMTestObj *)withScriptExecutionContextAndScriptStateWithSpaces;
     192- (void)withScriptArgumentsAndCallStack;
    192193- (void)methodWithOptionalArg:(int)opt;
    193194- (void)methodWithNonOptionalArgAndOptionalArg:(int)nonOpt opt:(int)opt;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm

    r107314 r107368  
    5151#import "DOMdInternal.h"
    5252#import "DOMeInternal.h"
    53 #import "DOMlogInternal.h"
    5453#import "Document.h"
    5554#import "EventListener.h"
     
    7776#import "d.h"
    7877#import "e.h"
    79 #import "log.h"
    8078#import <wtf/GetPtr.h>
    8179
     
    524522}
    525523
     524- (DOMTestObj *)withScriptArgumentsAndCallStackAttribute
     525{
     526    WebCore::JSMainThreadNullState state;
     527    return kit(WTF::getPtr(IMPL->withScriptArgumentsAndCallStackAttribute()));
     528}
     529
     530- (void)setWithScriptArgumentsAndCallStackAttribute:(DOMTestObj *)newWithScriptArgumentsAndCallStackAttribute
     531{
     532    WebCore::JSMainThreadNullState state;
     533    ASSERT(newWithScriptArgumentsAndCallStackAttribute);
     534
     535    IMPL->setWithScriptArgumentsAndCallStackAttribute(core(newWithScriptArgumentsAndCallStackAttribute));
     536}
     537
    526538- (NSString *)scriptStringAttr
    527539{
     
    773785}
    774786
    775 - (void)customArgsAndException:(DOMlog *)intArg
    776 {
    777     WebCore::JSMainThreadNullState state;
    778     WebCore::ExceptionCode ec = 0;
    779     IMPL->customArgsAndException(core(intArg), ec);
    780     WebCore::raiseOnDOMError(ec);
    781 }
    782 
    783787- (void)addEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture
    784788{
     
    849853    WebCore::JSMainThreadNullState state;
    850854    return kit(WTF::getPtr(IMPL->withScriptExecutionContextAndScriptStateWithSpaces()));
     855}
     856
     857- (void)withScriptArgumentsAndCallStack
     858{
     859    WebCore::JSMainThreadNullState state;
     860    IMPL->withScriptArgumentsAndCallStack();
    851861}
    852862
  • trunk/Source/WebCore/bindings/scripts/test/TestObj.idl

    r107314 r107368  
    8989        [Custom] void customMethodWithArgs(in long intArg, in DOMString strArg, in TestObj objArg);
    9090
    91         [CustomArgumentHandling] void customArgsAndException(in log intArg)
    92             raises(DOMException);
    93 
    9491        void addEventListener(in DOMString type,
    9592                              in EventListener listener,
     
    111108            raises(DOMException);
    112109        [CallWith=  ScriptExecutionContext  |  ScriptState  ] TestObj withScriptExecutionContextAndScriptStateWithSpaces();
     110        [CallWith=ScriptArguments|CallStack] void withScriptArgumentsAndCallStack();
    113111
    114112        attribute [CallWith=ScriptState] long withScriptStateAttribute;
     
    122120            getter raises(DOMException);
    123121        attribute [CallWith=  ScriptExecutionContext  |  ScriptState  ] TestObj withScriptExecutionContextAndScriptStateWithSpacesAttribute;
     122        attribute [CallWith=ScriptArguments|CallStack] TestObj withScriptArgumentsAndCallStackAttribute;
    124123
    125124        // 'Optional' extended attribute
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp

    r107314 r107368  
    5252#include "V8e.h"
    5353#include "V8int.h"
    54 #include "V8log.h"
    5554#include <wtf/GetPtr.h>
    5655#include <wtf/RefCounted.h>
     
    696695}
    697696
     697static v8::Handle<v8::Value> withScriptArgumentsAndCallStackAttributeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
     698{
     699    INC_STATS("DOM.TestObj.withScriptArgumentsAndCallStackAttribute._get");
     700    TestObj* imp = V8TestObj::toNative(info.Holder());
     701    RefPtr<ScriptCallStack> callStack(createScriptCallStackForInspector());
     702    if (!callStack)
     703        return v8::Undefined();
     704    return toV8(imp->withScriptArgumentsAndCallStackAttribute(callStack));
     705}
     706
     707static void withScriptArgumentsAndCallStackAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
     708{
     709    INC_STATS("DOM.TestObj.withScriptArgumentsAndCallStackAttribute._set");
     710    TestObj* imp = V8TestObj::toNative(info.Holder());
     711    TestObj* v = V8TestObj::HasInstance(value) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
     712    RefPtr<ScriptCallStack> callStack(createScriptCallStackForInspector());
     713    if (!callStack)
     714        return v8::Undefined();
     715    imp->setWithScriptArgumentsAndCallStackAttribute(callStack, WTF::getPtr(v));
     716    return;
     717}
     718
    698719static v8::Handle<v8::Value> scriptStringAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
    699720{
     
    11001121    {
    11011122    imp->methodWithException(ec);
    1102     if (UNLIKELY(ec))
    1103         goto fail;
    1104     return v8::Handle<v8::Value>();
    1105     }
    1106     fail:
    1107     V8Proxy::setDOMException(ec);
    1108     return v8::Handle<v8::Value>();
    1109 }
    1110 
    1111 static v8::Handle<v8::Value> customArgsAndExceptionCallback(const v8::Arguments& args)
    1112 {
    1113     INC_STATS("DOM.TestObj.customArgsAndException");
    1114     if (args.Length() < 1)
    1115         return throwError("Not enough arguments", V8Proxy::TypeError);
    1116     TestObj* imp = V8TestObj::toNative(args.Holder());
    1117     ExceptionCode ec = 0;
    1118     {
    1119     RefPtr<ScriptArguments> scriptArguments(createScriptArguments(args, 1));
    1120     RefPtr<ScriptCallStack> callStack(createScriptCallStackForInspector());
    1121     if (!callStack)
    1122         return v8::Undefined();
    1123     EXCEPTION_BLOCK(log*, intArg, V8log::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined)) ? V8log::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined))) : 0);
    1124     imp->customArgsAndException(intArg, scriptArguments, callStack, ec);
    11251123    if (UNLIKELY(ec))
    11261124        goto fail;
     
    12731271        return throwError(state.exception());
    12741272    return toV8(result.release());
     1273}
     1274
     1275static v8::Handle<v8::Value> withScriptArgumentsAndCallStackCallback(const v8::Arguments& args)
     1276{
     1277    INC_STATS("DOM.TestObj.withScriptArgumentsAndCallStack");
     1278    TestObj* imp = V8TestObj::toNative(args.Holder());
     1279    RefPtr<ScriptArguments> scriptArguments(createScriptArguments(args, 0));
     1280    RefPtr<ScriptCallStack> callStack(createScriptCallStackForInspector());
     1281    if (!callStack)
     1282        return v8::Undefined();
     1283    imp->withScriptArgumentsAndCallStack(scriptArguments, callStack);
     1284    return v8::Handle<v8::Value>();
    12751285}
    12761286
     
    18051815    // Attribute 'withScriptExecutionContextAndScriptStateWithSpacesAttribute' (Type: 'attribute' ExtAttr: 'CallWith')
    18061816    {"withScriptExecutionContextAndScriptStateWithSpacesAttribute", TestObjInternal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetter, TestObjInternal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
     1817    // Attribute 'withScriptArgumentsAndCallStackAttribute' (Type: 'attribute' ExtAttr: 'CallWith')
     1818    {"withScriptArgumentsAndCallStackAttribute", TestObjInternal::withScriptArgumentsAndCallStackAttributeAttrGetter, TestObjInternal::withScriptArgumentsAndCallStackAttributeAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
    18071819    // Attribute 'scriptStringAttr' (Type: 'readonly attribute' ExtAttr: 'ConvertScriptString')
    18081820    {"scriptStringAttr", TestObjInternal::scriptStringAttrAttrGetter, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
     
    18751887    {"withScriptExecutionContextAndScriptStateObjException", TestObjInternal::withScriptExecutionContextAndScriptStateObjExceptionCallback},
    18761888    {"withScriptExecutionContextAndScriptStateWithSpaces", TestObjInternal::withScriptExecutionContextAndScriptStateWithSpacesCallback},
     1889    {"withScriptArgumentsAndCallStack", TestObjInternal::withScriptArgumentsAndCallStackCallback},
    18771890    {"methodWithOptionalArg", TestObjInternal::methodWithOptionalArgCallback},
    18781891    {"methodWithNonOptionalArgAndOptionalArg", TestObjInternal::methodWithNonOptionalArgAndOptionalArgCallback},
     
    20062019    v8::Handle<v8::Signature> methodThatRequiresAllArgsAndThrowsSignature = v8::Signature::New(desc, methodThatRequiresAllArgsAndThrowsArgc, methodThatRequiresAllArgsAndThrowsArgv);
    20072020    proto->Set(v8::String::New("methodThatRequiresAllArgsAndThrows"), v8::FunctionTemplate::New(TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback, v8::Handle<v8::Value>(), methodThatRequiresAllArgsAndThrowsSignature));
    2008 
    2009     // Custom Signature 'customArgsAndException'
    2010     const int customArgsAndExceptionArgc = 1;
    2011     v8::Handle<v8::FunctionTemplate> customArgsAndExceptionArgv[customArgsAndExceptionArgc] = { V8log::GetRawTemplate() };
    2012     v8::Handle<v8::Signature> customArgsAndExceptionSignature = v8::Signature::New(desc, customArgsAndExceptionArgc, customArgsAndExceptionArgv);
    2013     proto->Set(v8::String::New("customArgsAndException"), v8::FunctionTemplate::New(TestObjInternal::customArgsAndExceptionCallback, v8::Handle<v8::Value>(), customArgsAndExceptionSignature));
    20142021    desc->Set(v8::String::New("classMethod"), v8::FunctionTemplate::New(TestObjInternal::classMethodCallback, v8::Handle<v8::Value>(), v8::Local<v8::Signature>()));
    20152022    desc->Set(v8::String::New("classMethodWithOptional"), v8::FunctionTemplate::New(TestObjInternal::classMethodWithOptionalCallback, v8::Handle<v8::Value>(), v8::Local<v8::Signature>()));
  • trunk/Source/WebCore/bindings/v8/custom/V8ConsoleCustom.cpp

    r95901 r107368  
    8080    bool condition = args[0]->BooleanValue();
    8181    RefPtr<ScriptArguments> scriptArguments(createScriptArguments(args, 1));
    82     imp->assertCondition(condition, scriptArguments.release(), callStack);
     82    imp->assertCondition(scriptArguments.release(), callStack, condition);
    8383    return v8::Handle<v8::Value>();
    8484}
  • trunk/Source/WebCore/page/Console.cpp

    r107291 r107368  
    237237}
    238238
    239 void Console::assertCondition(bool condition, PassRefPtr<ScriptArguments> arguments, PassRefPtr<ScriptCallStack> callStack)
     239void Console::assertCondition(PassRefPtr<ScriptArguments> arguments, PassRefPtr<ScriptCallStack> callStack, bool condition)
    240240{
    241241    if (condition)
     
    304304}
    305305
    306 void Console::timeEnd(const String& title, PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack> callStack)
     306void Console::timeEnd(PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack> callStack, const String& title)
    307307{
    308308#if PLATFORM(CHROMIUM)
  • trunk/Source/WebCore/page/Console.h

    r105310 r107368  
    6767    void dirxml(PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>);
    6868    void trace(PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>);
    69     void assertCondition(bool condition, PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>);
     69    void assertCondition(PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>, bool condition);
    7070    void count(PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>);
    7171    void markTimeline(PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>);
     
    7676#endif
    7777    void time(const String&);
    78     void timeEnd(const String&, PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>);
     78    void timeEnd(PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>, const String&);
    7979    void timeStamp(PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>);
    8080    void group(PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>);
  • trunk/Source/WebCore/page/Console.idl

    r107304 r107368  
    3434    ] Console {
    3535
    36         [CustomArgumentHandling] void debug();
    37         [CustomArgumentHandling] void error();
    38         [CustomArgumentHandling] void info();
    39         [CustomArgumentHandling] void log();
    40         [CustomArgumentHandling] void warn();
    41         [CustomArgumentHandling] void dir();
    42         [CustomArgumentHandling] void dirxml();
    43         [V8Custom, CustomArgumentHandling] void trace();
    44         [V8Custom, CustomArgumentHandling, ImplementedAs=assertCondition] void assert(in boolean condition);
    45         [CustomArgumentHandling] void count();
    46         [CustomArgumentHandling] void markTimeline();
     36        [CallWith=ScriptArguments|CallStack] void debug();
     37        [CallWith=ScriptArguments|CallStack] void error();
     38        [CallWith=ScriptArguments|CallStack] void info();
     39        [CallWith=ScriptArguments|CallStack] void log();
     40        [CallWith=ScriptArguments|CallStack] void warn();
     41        [CallWith=ScriptArguments|CallStack] void dir();
     42        [CallWith=ScriptArguments|CallStack] void dirxml();
     43        [V8Custom, CallWith=ScriptArguments|CallStack] void trace();
     44        [V8Custom, CallWith=ScriptArguments|CallStack, ImplementedAs=assertCondition] void assert(in boolean condition);
     45        [CallWith=ScriptArguments|CallStack] void count();
     46        [CallWith=ScriptArguments|CallStack] void markTimeline();
    4747
    4848#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
     
    5353
    5454        void time(in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=DefaultIsUndefined] DOMString title);
    55         [CustomArgumentHandling] void timeEnd(in [TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString title);
    56         [CustomArgumentHandling] void timeStamp();
    57         [CustomArgumentHandling] void group();
    58         [CustomArgumentHandling] void groupCollapsed();
     55        [CallWith=ScriptArguments|CallStack] void timeEnd(in [TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString title);
     56        [CallWith=ScriptArguments|CallStack] void timeStamp();
     57        [CallWith=ScriptArguments|CallStack] void group();
     58        [CallWith=ScriptArguments|CallStack] void groupCollapsed();
    5959        void groupEnd();
    6060
Note: See TracChangeset for help on using the changeset viewer.