Skip to content

Bug in Chrome Beta requires WeakMap upgrade #1154

toji opened this Issue Mar 6, 2013 · 11 comments

4 participants

toji commented Mar 6, 2013

On a couple of devices that I've tried recently (The Chromebook Pixel and an Ubuntu box) Montage has failed to load any applications, giving the following error:

TypeError: Property 'isExtensible' of object #<Object> is not a function
    at getHiddenRecord (
    at Function.identifyingFreeze (
    at __FILE__http______montagejs__github__com__montage__core__extras__object__ (
    at module.factory (
    at getExports (
    at require (
    at __FILE__http______montagejs__github__com__montage__core__core__ (
    at module.factory (
    at getExports (
    at getExports ( function () {


                var EventManager = montageRequire("core/event/event-manager").EventManager;
                var Deserializer = montageRequire("core/deserializer").Deserializer;
                var defaultEventManager, application;

                // Load the event-manager
                defaultEventManager = EventManager.create().initWithWindow(window);

                // montageWillLoad is mostly for testing purposes
                if (typeof global.montageWillLoad === "function") {

                // Load the application

                var appProto = applicationRequire.packageDescription.applicationPrototype,
                    applicationDescription, appModulePromise;
                if (appProto) {
                    applicationDescription = Deserializer.parseForModuleAndName(appProto);
                    appModulePromise = applicationRequire.async(applicationDescription.module);
                } else {
                    appModulePromise = montageRequire.async("ui/application");

                return appModulePromise.then(function(exports) {
                    application = exports[(applicationDescription ? : "Application")].create();
                    window.document.application = application;
                    defaultEventManager.application = application;
                    application.eventManager = defaultEventManager;
                    application._load(applicationRequire, function() {
                        if (params.module) {
                            // If a module was specified in the config then we initialize it now

            } promise.js:462
Should be empty: 
Uncaught TypeError: Property 'isExtensible' of object #<Object> is not a function 

Both of the failing devices are running the current Chrome Beta (Version 26.0.1410.19), and I've seen other devices (Macbook and Samsung Chromebook) running Chrome Stable, Dev, or Canary channels working fine, so it's highly likely that this is an issue with the Beta that will be resolved as part of the release process. It's worth keeping an eye out for, though.

MontageJS member

Thanks for the heads up. Object.isExtensible is an ES5 method and the WeakMap is a module that @erights made. He will be anxious to hear that the method appears to have gone away in a Chrome beta.

erights commented Mar 6, 2013

This is fixed on es-lab at as of r800. See also which is still under review for commitment-to-be to the Caja source tree.

MontageJS member

Thanks, @erights. We’ll sync.

erights commented Mar 6, 2013

@toji Have you seen it fail on anything other than a Linux base? Everytime we've encountered this problem, it's always been on a Chrome on Linux. Although the version I mention above avoids this bug, we have not yet actually diagnosed the underlying problem.

toji commented Mar 7, 2013
@kriskowal kriskowal was assigned Mar 11, 2013
MontageJS member

I have update the title of the issue and assigned to myself. Thanks.

toji commented Mar 12, 2013

Is there a way to manually work around this for the moment? It's unfortunately turned into a blocking issue for me.

MontageJS member

@toji, try replacing our weak-map implementation with the latest

It may require some patching to export the WeakMap as a CommonJS module. You might check the history for the file to see the patches.

@mczepiel mczepiel closed this Jun 14, 2013
@mczepiel mczepiel reopened this Jun 14, 2013
MontageJS member

Clicked the wrong button, @kriskowal is this something on your radar? The pull request looks sane; though I'm a little confused about the travis failure

MontageJS member

This is still on my radar.

MontageJS member

Since this issue was brought up, WeakMap has been factored out into its own package that I keep in sync with the Caja Subversion. This issue was addressed.

@kriskowal kriskowal closed this May 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.