Closed Bug 1308482 Opened 8 years ago Closed 8 years ago

Implement ObjectDefineProperties changes

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: evilpie, Assigned: evilpie)

References

Details

Attachments

(2 files)

The MOP operation order for Object.defineProperties and Object.create changed, because they use this function.
Attachment #8798906 - Flags: review?(arai.unmht)
Comment on attachment 8798906 [details] [diff] [review]
Implement ObjectDefineProperties changes

Review of attachment 8798906 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/builtin/Object.cpp
@@ +688,5 @@
> +    RootedId nextKey(cx);
> +    Rooted<PropertyDescriptor> desc(cx);
> +    RootedValue descObj(cx);
> +
> +    // Step

Step 4. ?
Attachment #8798906 - Flags: review?(arai.unmht) → review+
Sorry, somehow I didn't run jit-tests before asking review. There was a somewhat subtle issue in my first patch. Because we only add enumerable descriptors to the descriptors array, we can actually get out of sync with the 'keys' array. I added a second array just for the keys we actually want to define. This is covered by jit-test/tests/proxy/testDirectProxyOwnKeysSymbol.js.
Attachment #8799251 - Flags: review?(arai.unmht)
Comment on attachment 8799251 [details] [diff] [review]
v2 - Implement ObjectDefineProperties changes

Review of attachment 8799251 [details] [diff] [review]:
-----------------------------------------------------------------

wow, I should've caught it :P

::: js/src/jit-test/tests/proxy/testDirectProxyOwnKeysSymbol.js
@@ +6,4 @@
>          return [symbol, symbol2];
>      },
>      getOwnPropertyDescriptor(target, name) {
> +        print("name: " + String(name));

please remove this ;)
Attachment #8799251 - Flags: review?(arai.unmht) → review+
Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f92acdeafd27
Implement ObjectDefineProperties changes. r=arai
https://hg.mozilla.org/mozilla-central/rev/f92acdeafd27
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Blocks: 1313914
No longer blocks: 1313914
Depends on: 1313914
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: