Bug 102819 - Object properties set with `Object.defineProperty` disappear during execution
Summary: Object properties set with `Object.defineProperty` disappear during execution
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: https://popcorn.webmaker.org/template...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-20 09:17 PST by bobby
Modified: 2012-11-20 12:34 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bobby 2012-11-20 09:17:19 PST
STR:

1. Visit https://popcorn.webmaker.org/templates/basic/?savedDataUrl=ted.json
2. Wait until loaded (should be a few seconds).
3. Press play.

Expected: Normal execution of Popcorn Maker.
Actual: Crash.

Everything works as expected in Chrome and Firefox, but Safari has given us trouble here. WebKit nightly has a slight different manifestation of the same problem, which we've managed to exploit as we attempted to troubleshoot this crash in our system. The crash occurs here, https://github.com/mozilla/butter/blob/master/src/timeline/timebar.js#L19 `tracksContainer.container.getBoundingClientRect().width` where `container` is erroneously `undefined`. 

The block which defines the `container` property for that object exists here, https://github.com/mozilla/butter/blob/master/src/timeline/track-container.js#L394, and the actual variable referenced is initialized, here https://github.com/mozilla/butter/blob/master/src/timeline/track-container.js#L17.

Some experiments uncovered that when the crash happens, the getter function is never executed, so the evaluation of `tracksContainer.container` must not be using it at all, and simple returning `undefined`. Moreover, changing `tracksContainer.container` to `tracksContainer['container']` works as expected, and using the `value` parameter to immediately specify the value of the `container` works as well (e.g. `Object.defineProperty(this, 'container', { value: _container });`).

Any help reducing this problem is appreciated, since it's situated deep within our app. I'm happy to assist where necessary.