Bug 646444 - bug 582717 make regular expressions not callable [r=mfinkle]
authorVivien Nicolas <21@vingtetun.org>
Wed, 30 Mar 2011 18:50:01 +0200
changeset 67551 a2777c21e32d73115e3a44d4d188c15d5dc68269
parent 67550 7e323ab6456a82c6182e5b43962120fcb5fd193b
child 67552 c7024c1bc6e858050092ca236dc1e798ea040bb0
push id19389
push userffxbld
push dateWed, 06 Apr 2011 21:33:21 +0000
treeherdermozilla-central@8e9f90073a20 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs646444, 582717
Bug 646444 - bug 582717 make regular expressions not callable [r=mfinkle]
mobile/chrome/content/bindings/browser.xml
--- a/mobile/chrome/content/bindings/browser.xml
+++ b/mobile/chrome/content/bindings/browser.xml
@@ -172,20 +172,20 @@
                   (docURI.schemeIs("http") || docURI.schemeIs("https")));
         ]]></body>
       </method>
 
       <method name="_getLinkType">
         <parameter name="aLink" />
         <body><![CDATA[
           let type = "";
-          if (/\bicon\b/i(aLink.rel)) {
+          if (/\bicon\b/i.test(aLink.rel)) {
             type = "icon";
           }
-          else if (/\bsearch\b/i(aLink.rel) && aLink.type && aLink.title) {
+          else if (/\bsearch\b/i.test(aLink.rel) && aLink.type && aLink.title) {
             let linkType = aLink.type.replace(/^\s+|\s*(?:;.*)?$/g, "").toLowerCase();
             if (linkType == "application/opensearchdescription+xml" && /^(?:https?|ftp):/i.test(aLink.href)) {
               type = "search";
             }
           }
 
           return type;
         ]]></body>