Closed
Bug 517229
Opened 16 years ago
Closed 16 years ago
SecureMembrane.BaseWrapper.iteratorObject is broken
Categories
(Mozilla Labs :: Jetpack Prototype, defect, P1)
Mozilla Labs
Jetpack Prototype
Tracking
(Not tracked)
RESOLVED
FIXED
0.6
People
(Reporter: adw, Assigned: adw)
Details
Attachments
(1 file)
1.98 KB,
patch
|
Details | Diff | Splinter Review |
None of the Twitter lib functions work in the 0.5 release and current trunk. Here's the error and stack (from code in the Bespin panel) they all produce:
TypeError: this.safeGetProperty is not a function
keyValueIterator()@chrome://jetpack/content/js/secure-membrane.js:144
userOptsToAjaxOpts([object FlexibleWrapper])@chrome://jetpack/content/js/twitter.js:343
([object FlexibleWrapper])@chrome://jetpack/content/js/twitter.js:313
call((function (opts) {try {var ajaxOpts = userOptsToAjaxOpts(opts);var url = [aSchemeAndHost].concat(urlFrags).concat(interpParam ? ajaxOpts.data[interpParam] : []).join("/") + ".json";ajax(url, aHttpMethod, ajaxOpts);} catch (err) {dump("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" + err + "\n" + err.stack + "\n");}}),[object FlexibleWrapper],[object FlexibleWrapper],[object Array])@chrome://jetpack/content/js/secure-membrane.js:285
@:0
@file:///Users/adw/Library/Application%20Support/Firefox/Profiles/beb1kaoj.jetpack2/jetpack-editor-code.txt:3
All Twitter lib functions go through userOptsToAjaxOpts(), which takes an object passed in by the feature, aUserOpts, and iterates over its keys and values:
for (let [prop, val] in Iterator(aUserOpts))
dupe[prop] = val;
Line 343 as indicated by the stack is the second line above. dupe is an object local to userOptsToAjaxOpts().
Atul, what exactly is the problem here? Is line 343 erroneous? Is it actually Iterator(aUserOpts) that's causing the error in keyValueIterator()?
Assignee | ||
Comment 1•16 years ago
|
||
SecureMembrane.BaseWrapper.iteratorObject is broken due to a typo, |this| -> |self| in the inner keyValueIterator function. |this| evaluates to the global object, not the object being iterated over. |self| is defined but never used.
Summary: Twitter library is broken → SecureMembrane.BaseWrapper.iteratorObject is broken
Assignee | ||
Comment 2•16 years ago
|
||
Atul, can you review this so we can land it ASAP? This bug breaks Twitter and my menu code. Really annoying.
Attachment #401688 -
Flags: review?(avarma)
Comment 3•16 years ago
|
||
Thanks Drew! Committed here:
http://hg.mozilla.org/labs/jetpack/rev/770d7cdb7c92
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•15 years ago
|
Attachment #401688 -
Flags: review?(avarma)
You need to log in
before you can comment on or make changes to this bug.
Description
•