⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 201876 in webkit


Ignore:
Timestamp:
Jun 9, 2016, 11:47:21 AM (10 years ago)
Author:
Chris Dumez
Message:

WorkerGlobalScope attributes / operations should be on the prototype
​https://bugs.webkit.org/show_bug.cgi?id=158568
<rdar://problem/26720079>

Reviewed by Geoffrey Garen.

Source/WebCore:

WorkerGlobalScope attributes / operations should be on the prototype
because WorkerGlobalScope is not marked as [Global] / [PrimaryGlobal]:

DedicatedWorkerGlobalScope is the interface that is marked as [Global]
and whose attributes / operations should be on the instance.

This brings the number of failures on ​http://w3c-test.org/workers/interfaces.worker
from 65 to 34. It also aligns our behavior with Firefox and Chrome.

Test: fast/workers/WorkerGlobalScope-properties-prototype.html

  • bindings/scripts/CodeGeneratorJS.pm:

(InterfaceRequiresAttributesOnInstance):
(OperationShouldBeOnInstance):

LayoutTests:

  • fast/workers/WorkerGlobalScope-properties-prototype-expected.txt: Added.
  • fast/workers/WorkerGlobalScope-properties-prototype.html: Added.

Add layout test coverage.

  • fast/workers/self-hasOwnProperty-expected.txt:
  • fast/workers/self-hasOwnProperty.html:

Update test I added a couple of days ago because it wrongly expected
the 'navigator' property to be on the instance. This check was failing
in other browsers (Firefox and Chrome).

Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r201875 r201876  
     12016-06-09  Chris Dumez  <cdumez@apple.com>
     2
     3        WorkerGlobalScope attributes / operations should be on the prototype
     4        https://bugs.webkit.org/show_bug.cgi?id=158568
     5        <rdar://problem/26720079>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        * fast/workers/WorkerGlobalScope-properties-prototype-expected.txt: Added.
     10        * fast/workers/WorkerGlobalScope-properties-prototype.html: Added.
     11        Add layout test coverage.
     12
     13        * fast/workers/self-hasOwnProperty-expected.txt:
     14        * fast/workers/self-hasOwnProperty.html:
     15        Update test I added a couple of days ago because it wrongly expected
     16        the 'navigator' property to be on the instance. This check was failing
     17        in other browsers (Firefox and Chrome).
     18
    1192016-06-09  Tim Horton  <timothy_horton@apple.com>
    220
  • trunk/LayoutTests/fast/workers/self-hasOwnProperty-expected.txt

    r201808 r201876  
    66self.hasOwnProperty('DedicatedWorkerGlobalScope'): true
    77self.hasOwnProperty('WorkerGlobalScope'): true
    8 self.hasOwnProperty('navigator'): true
     8self.hasOwnProperty('postMessage'): true
    99PASS successfullyParsed is true
    1010
  • trunk/LayoutTests/fast/workers/self-hasOwnProperty.html

    r201808 r201876  
    1111worker.postMessage("eval self.hasOwnProperty('DedicatedWorkerGlobalScope')");
    1212worker.postMessage("eval self.hasOwnProperty('WorkerGlobalScope')");
    13 worker.postMessage("eval self.hasOwnProperty('navigator')");
     13worker.postMessage("eval self.hasOwnProperty('postMessage')");
    1414worker.postMessage("eval DONE");
    1515
  • trunk/Source/WebCore/ChangeLog

    r201875 r201876  
     12016-06-09  Chris Dumez  <cdumez@apple.com>
     2
     3        WorkerGlobalScope attributes / operations should be on the prototype
     4        https://bugs.webkit.org/show_bug.cgi?id=158568
     5        <rdar://problem/26720079>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        WorkerGlobalScope attributes / operations should be on the prototype
     10        because WorkerGlobalScope is not marked as [Global] / [PrimaryGlobal]:
     11        - https://html.spec.whatwg.org/multipage/workers.html#the-workerglobalscope-common-interface
     12        - http://heycam.github.io/webidl/#es-attributes
     13        - http://heycam.github.io/webidl/#es-operations
     14
     15        DedicatedWorkerGlobalScope is the interface that is marked as [Global]
     16        and whose attributes / operations should be on the instance.
     17
     18        This brings the number of failures on http://w3c-test.org/workers/interfaces.worker
     19        from 65 to 34. It also aligns our behavior with Firefox and Chrome.
     20
     21        Test: fast/workers/WorkerGlobalScope-properties-prototype.html
     22
     23        * bindings/scripts/CodeGeneratorJS.pm:
     24        (InterfaceRequiresAttributesOnInstance):
     25        (OperationShouldBeOnInstance):
     26
    1272016-06-09  Tim Horton  <timothy_horton@apple.com>
    228
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r201852 r201876  
    559559    return 1 if $interface->isException;
    560560
    561     return 1 if IsDOMGlobalObject($interface);
     561    # FIXME: Add support for [PrimaryGlobal] / [Global].
     562    return 1 if IsDOMGlobalObject($interface) && $interface->name ne "WorkerGlobalScope";
    562563
    563564    return 1 if InterfaceRequiresAttributesOnInstanceForCompatibility($interface);
    … …  
    597598    my $function = shift;
    598599
    599     return 1 if IsDOMGlobalObject($interface);
     600    # FIXME: Add support for [PrimaryGlobal] / [Global].
     601    return 1 if IsDOMGlobalObject($interface) && $interface->name ne "WorkerGlobalScope";
    600602
    601603    # FIXME: The bindings generator does not support putting runtime-enabled operations on the instance yet (except for global objects).
Note: See TracChangeset for help on using the changeset viewer.