Closed Bug 1149604 Opened 9 years ago Closed 9 years ago

"Re-com" demo page is blank in Nightly & Developer Edition, with "ReferenceError: re_demo is not defined"

Categories

(Web Compatibility :: Site Reports, defect)

defect
Not set
normal

Tracking

(firefox40 affected)

RESOLVED DUPLICATE of bug 1138325
Tracking Status
firefox40 --- affected

People

(Reporter: dholbert, Unassigned)

References

()

Details

(Whiteboard: [js] [regexp-source] [lib-re-com] [lib-clojurescript])

STR:
 1. Load http://re-demo.s3-website-ap-southeast-2.amazonaws.com/
 2. (optional) Check Browser Console (ctrl-shift-J)

ACTUAL RESULTS: Blank page, and browser console says:
 ReferenceError: re_demo is not defined    re-demo.s3-website-ap-southeast-2.amazonaws.com:23:16

EXPECTED RESULTS: Visible web app; no such error in JS error console.

Firefox release (36) and Beta (37) give EXPECTED RESULTS. Firefox Developer Edition (38) and Nightly (39) give ACTUAL RESULTS. 

Regression range:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=994141100597&tochange=87d812111396

arai / terrence, looks like your bugs (bug 1130860, bug 1130226) are the only ones in the regression window.  Could you take a look? Were either of your bug-fixes intended to be potentially-site-breaking changes? (and if so, can you suggest a fix for the site?)
Flags: needinfo?(arai.unmht)
Flags: needinfo?(terrence)
Blocks: 1149339
The other relevant console message is:

  uncaught exception: Invalid match arg: /^/

The throwing function there looks like this:

    function er(a, b, c) {
        if ("string" === typeof b) return a.replace(new RegExp(String(b).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, "\\$1").replace(/\x08/g, "\\x08"), "g"), c);
        if (n(b.hasOwnProperty("source"))) return a.replace(new RegExp(b.source, "g"), c);
        throw [p("Invalid match arg: "), p(b)].join("");
    }

where b == /^/, a="", c="".

So typeof b != "string" and b.hasOwnProperty("source") is false as of 1120169 (which is in the regression range), so this ends up throwing.

In fact, the above function looks likely to be a duplicate of bug 1138325...
Blocks: 1120169
Depends on: 1138325
This should be a dupe of bug 1138325, which is caused by bug 1120169 (It moves "source" property from RegExp instance to RegExp.prototype accessor)

it's thrown from following function:

  function er(a,b,c) {
    if ("string" === typeof b)
      return a.replace(new RegExp(String(b).
                                  replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").
                                  replace(/\x08/g,"\\x08"),"g"), c);
    if (n(b.hasOwnProperty("source")))
      return a.replace(new RegExp(b.source,"g"),c);
    throw [p("Invalid match arg: "), p(b)].join("");
  }

it seems to be a compiled code from "before" code of following patch:
  https://github.com/clojure/clojurescript/commit/d717b4edea074fcfd3e718a6134238ba26f76f82:
No longer depends on: 1138325
Flags: needinfo?(arai.unmht)
sorry for collision :/
Blocks: 1138325
Looks like the source repo for this re-com library was deleted by the author: https://github.com/Day8/re-com/
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
No longer blocks: 1138325, 1120169
Component: JavaScript Engine → Desktop
Flags: needinfo?(terrence)
Product: Core → Tech Evangelism
Whiteboard: [js] [regexp-source] [lib-re-com]
Says the source: "Re-com is a library of ClojureScript UI components"
Whiteboard: [js] [regexp-source] [lib-re-com] → [js] [regexp-source] [lib-re-com] [lib-clojurescript]
This is, indeed, a duplicate of  bug #1138325
After re-building our app with the latest clourescript compiler, the issue is fixed.
Product: Tech Evangelism → Web Compatibility
You need to log in before you can comment on or make changes to this bug.