Last Comment Bug 684178 - jsfiddle.net throws error selectionRange is not defined in nightly 09/01
: jsfiddle.net throws error selectionRange is not defined in nightly 09/01
Status: VERIFIED FIXED
: regression
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla9
Assigned To: Jason Orendorff [:jorendorff]
:
Mentors:
http://jsfiddle.net
: 684779 684972 685864 (view as bug list)
Depends on:
Blocks: 561359
  Show dependency treegraph
 
Reported: 2011-09-01 23:53 PDT by Cork
Modified: 2011-09-12 19:51 PDT (History)
10 users (show)
ehsan: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
+


Attachments
v1 (3.12 KB, patch)
2011-09-02 14:50 PDT, Jason Orendorff [:jorendorff]
jwalden+bmo: review+
Details | Diff | Review

Description Cork 2011-09-01 23:53:50 PDT
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
Comment 1 Boris Zbarsky [:bz] (Out June 25-July 6) 2011-09-02 08:30:00 PDT
Requesting tracking for the regression.

Cork, can you narrow down which of those changesets is causing the problem?
Comment 3 Jason Orendorff [:jorendorff] 2011-09-02 12:44:27 PDT
Oh, great, it has to do with local function declarations. Reduced:

var obj = {};
(function() {
    if (obj) {
        function f() {}
        obj.m = function() { f(); };
    }
})();
obj.m();
Comment 4 Jason Orendorff [:jorendorff] 2011-09-02 12:52:23 PDT
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
Comment 5 Jason Orendorff [:jorendorff] 2011-09-02 14:50:08 PDT
Created attachment 557954 [details] [diff] [review]
v1

This r? would go to Waldo if he were around.
Comment 6 Jeff Walden [:Waldo] (remove +bmo to email) 2011-09-06 11:12:06 PDT
Comment on attachment 557954 [details] [diff] [review]
v1

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

Stealing per jorendorff's request, looks reasonable.
Comment 7 :Ehsan Akhgari (busy, don't ask for review please) 2011-09-08 10:21:29 PDT
http://hg.mozilla.org/mozilla-central/rev/6b384ab36161
Comment 8 Alice0775 White 2011-09-12 06:48:30 PDT
*** Bug 685864 has been marked as a duplicate of this bug. ***
Comment 9 Cork 2011-09-12 10:26:22 PDT
Verified fixed in Mozilla/5.0 (X11; Linux x86_64; rv:9.0a1) Gecko/20110911 Firefox/9.0a1
Comment 10 Alice0775 White 2011-09-12 19:48:57 PDT
*** Bug 684779 has been marked as a duplicate of this bug. ***
Comment 11 Alice0775 White 2011-09-12 19:51:00 PDT
*** Bug 684972 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.