Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F22962959
D1105.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D1105.diff
View Options
Index: src/core/Stratcom.js
===================================================================
--- src/core/Stratcom.js
+++ src/core/Stratcom.js
@@ -482,9 +482,6 @@
this._data[block] = data;
if (block == 0) {
JX.Stratcom.ready = true;
- JX.flushHoldingQueue('install-init', function(fn) {
- fn();
- });
JX.__rawEventQueue({type: 'start-queue'});
}
},
@@ -553,6 +550,12 @@
*/
getData : function(node) {
if (__DEV__) {
+ if (!JX.Stratcom.ready) {
+ JX.$E(
+ 'JX.Stratcom.getData(...): ' +
+ 'cannot call before metadata has been merged. Do not call this ' +
+ 'method directly from a class initialize function.');
+ }
if (!node || !node.getAttribute) {
JX.$E(
'JX.Stratcom.getData(<non-element>): ' +
Index: src/core/init.js
===================================================================
--- src/core/init.js
+++ src/core/init.js
@@ -44,7 +44,6 @@
makeHoldingQueue('install');
makeHoldingQueue('behavior');
- makeHoldingQueue('install-init');
window['__DEV__'] = window['__DEV__'] || 0;
Index: src/core/install.js
===================================================================
--- src/core/install.js
+++ src/core/install.js
@@ -132,14 +132,7 @@
JX[name] = JX.createClass(junk);
- if (initialize) {
- if (JX['Stratcom'] && JX['Stratcom'].ready) {
- initialize.apply(null);
- } else {
- // This is a holding queue, defined in init.js.
- JX['install-init'](initialize);
- }
- }
+ initialize && initialize.apply(JX[name]);
}
// In effect, this exits the loop as soon as we didn't make any progress
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 1, 4:58 AM (12 h, 17 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
17377478
Default Alt Text
D1105.diff (1 KB)
Attached To
Mode
D1105: Initialize immediately, throw when accessing node data before merge.
Attached
Detach File
Event Timeline
Log In to Comment