Changeset 49929 in webkit


Ignore:
Timestamp:
Oct 21, 2009 4:57:01 PM (15 years ago)
Author:
dumi@chromium.org
Message:

Adding the ability to enable/disable functions in V8 at runtime.

Patch by Dumitru Daniliuc <dumi@chromium.org> on 2009-10-21
Reviewed by Dimitri Glazkov.

https://bugs.webkit.org/show_bug.cgi?id=30650

  • bindings/scripts/CodeGeneratorV8.pm:
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r49926 r49929  
     12009-10-21  Dumitru Daniliuc  <dumi@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Adding the ability to enable/disable functions in V8 at runtime.
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=30650
     8
     9        * bindings/scripts/CodeGeneratorV8.pm:
     10
    1112009-10-21  Darin Adler  <darin@apple.com>
    212
  • trunk/WebCore/bindings/scripts/CodeGeneratorV8.pm

    r49756 r49929  
    13231323        }
    13241324
     1325        my $conditional = "";
     1326        if ($attrExt->{"EnabledAtRuntime"}) {
     1327            # Only call Set()/SetAccessor() if this method should be enabled
     1328            $enable_function = $interfaceName . $codeGenerator->WK_ucfirst($function->signature->name);
     1329            $conditional = "if (V8Custom::v8${enable_function}Enabled())\n";
     1330        }
     1331
    13251332        if ($attrExt->{"DoNotCheckDomainSecurity"} &&
    13261333            ($dataNode->extendedAttributes->{"CheckDomainSecurity"} || $interfaceName eq "DOMWindow")) {
     
    13431350
    13441351  // $commentInfo
    1345   $template->SetAccessor(
     1352  $conditional $template->SetAccessor(
    13461353      v8::String::New("$name"),
    13471354      ${interfaceName}Internal::${name}AttrGetter,
     
    13711378
    13721379  // $commentInfo
    1373   ${template}->Set(
     1380  $conditional ${template}->Set(
    13741381      v8::String::New("$name"),
    13751382      $templateFunction,
Note: See TracChangeset for help on using the changeset viewer.