Closed Bug 684178 Opened 13 years ago Closed 13 years ago

jsfiddle.net throws error selectionRange is not defined in nightly 09/01

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla9
Tracking Status
firefox9 + ---

People

(Reporter: cork, Assigned: jorendorff)

References

()

Details

(Keywords: regression)

Attachments

(1 file)

The edit fields doesn't work in jsfiddle

Reproducible: Always

Steps to Reproduce:
 1. Open jsfiddle
 2. Look in error console

Actual Results:  
The edit fields is empty and ins't editable
Error console shows
  Error: selectionRange is not defined
  Source File: http://jsfiddle.net/codemirror/js/select.js
  Line: 631

Expected Results:  
The top two and the left field should be editable.

Regression range:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=f1dbc0a63703&tochange=9eaca4ef5880
Keywords: regression
Requesting tracking for the regression.

Cork, can you narrow down which of those changesets is causing the problem?
Blocks: 561359
Assignee: general → jorendorff
Oh, great, it has to do with local function declarations. Reduced:

var obj = {};
(function() {
    if (obj) {
        function f() {}
        obj.m = function() { f(); };
    }
})();
obj.m();
The outer, anonymous function is heavyweight, so the inner lambda should not be a null closure, much less qualify for the method optimization, but:

00000:  name "obj"
00003:  ifeq 21 (+18)
00006:  deffun function f() {}
00009:  nullblockchain
00010:  name "obj"
00013:  lambda (function () {f();})
00016:  nullblockchain                   <--- wrong
00017:  setmethod "m"                    <--- seriously wrong
00020:  pop
00021:  stop
Attached patch v1Splinter Review
This r? would go to Waldo if he were around.
Attachment #557954 - Flags: review?(cdleary)
Comment on attachment 557954 [details] [diff] [review]
v1

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

Stealing per jorendorff's request, looks reasonable.
Attachment #557954 - Flags: review?(cdleary) → review+
http://hg.mozilla.org/mozilla-central/rev/6b384ab36161
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
Verified fixed in Mozilla/5.0 (X11; Linux x86_64; rv:9.0a1) Gecko/20110911 Firefox/9.0a1
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: