[v8-dev] Issue 3183 in v8: "Object # has no method push" on Array after deoptimization

Wed, 26 Feb 2014 10:46:18 -0800

Status: New
Owner: ----

New issue 3183 by [email protected]: "Object #<Object> has no method push" on Array after deoptimization
http://code.google.com/p/v8/issues/detail?id=3183

The following function in some cases throws an exception "Object #<Object> has no method push" only in Chrome 33 (neither in previous version, nor in other browsers):

function subscribe(event, handler, ctx, first) {
  // some checks...
  if (typeof handler === 'function'){
    if (!this._events[event]) {
        this._events[event] = [];
    }
this._events[event][!first ? 'push' : 'unshift']({ fn : handler, ctx : ctx }); // <-- THIS LINE
  } else {
    throw new TypeError("Event '" + event + "' has unexpected handler");
  }
}

Stack trace shows, that exception is thrown on a line marked with "<-- THIS LINE"

All attempts to try to debug this fails.

If I modify code - it won't reproduce. If set breakpoint - won't reproduce. Set conditional breakpoint - won't reproduce. Wrap with try/catch and log in catch block - won't reproduce.

So, I've decided this is related to optimizing compiler. I've added the following lines to a function

if(arguments[100]) {
   void(0);
}

and it stops reproducing.

Next, I've run Chrome with the following flags
--no-sandbox --js-flags="--trace-phase=Z --trace-hydrogen --trace-deopt --code-comments", got deopt log and IR dump. They are attached.

Attachments:
        subscribe-deopt.txt  1.5 KB
        subscribe-IR.txt  64.0 KB

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to