assertion failed in Safari only

145 views
Skip to first unread message

yuton...@schrodinger.com

unread,
Mar 31, 2015, 3:15:12 PM3/31/15
to polym...@googlegroups.com
I'm seeing an assertion failed error in my app in line 118 of webcomponent.js:

    window.ShadowDOMPolyfill = {};
    (function(scope) {
        "use strict";
        var constructorTable = new WeakMap();
        var nativePrototypeTable = new WeakMap();
        var wrappers = Object.create(null);
        function detectEval() {
            if (typeof chrome !== "undefined" && chrome.app && chrome.app.runtime) {
                return false;
            }
            if (navigator.getDeviceStorage) {
                return false;
            }
            try {
                var f = new Function("return true;");
                return f();
            } catch (ex) {
                return false;
            }
        }
        var hasEval = detectEval();
        function assert(b) {
            if (!b) 
                throw new Error("Assertion failed");
        }

This only shows up in Safari, and not Chrome. Any ideas?

yuton...@schrodinger.com

unread,
Mar 31, 2015, 4:34:22 PM3/31/15
to polym...@googlegroups.com, yuton...@schrodinger.com
This was my own screw up.

jaso...@gmail.com

unread,
May 21, 2015, 6:06:33 PM5/21/15
to polym...@googlegroups.com, yuton...@schrodinger.com
And what did you screw up? Because I'm having the same issue. I've been off this app for half a year and suddenly i've been told it doesn't work in safari.

The error gives ZERO hints to what the issue is, except that apparently safari doesn't have eval? Not that I use it anywhere.

So what fixed your issue?

jaso...@gmail.com

unread,
May 23, 2015, 6:28:02 PM5/23/15
to polym...@googlegroups.com, yuton...@schrodinger.com, jaso...@gmail.com
In my case jQuery was out of date. Updating it fixed all issues.
Reply all
Reply to author
Forward
0 new messages