New issue
Advanced search Search tips

Issue 643029 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

document.body['onload'] property disappear randomly

Reported by xiexingy...@gmail.com, Sep 1 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

Steps to reproduce the problem:
1. my page have 1 main page and 2 iframe subpage;
2. load the main page 
3. load the iframe subpage, and on the end of subpage , my JS code try to rewrite the document.body['onload'] =Function(new_codes);

What is the expected behavior?
document.body.onload is  function anonymous { new_codes } ; and my_codes can be executed;

What went wrong?
in console , I see the  document.body.onload  is undefined, but my new_codes can be executed randomly. 
it looks like the document.body.onload property have been memory release before it execute 

Did this work before? No 

Chrome version: 52.0.2743.116  Channel: n/a
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 22.0 r0

I use 3 ways to workaround the bug :
1. use the firefox and safari 
2. use the element.setAttribute("onload", new_code)  to replace the element['onload'] = Function(body);
3.add a new  useless property : element['._myonload'] = element['onload'];
 

Comment 1 by tkent@chromium.org, Sep 4 2016

Cc: tkent@chromium.org
Labels: Needs-Feedback
Can you provide reproducible HTML files?

this origin html page;

2016-09-05 7:36 GMT+08:00 tk… via monorail <
monorail+v2.567034358@chromium.org>:
Unfortunately , this page is the netgear 8500 router's manage page, it
can't work if it is out of the router.

2016-09-05 15:40 GMT+08:00 谢兴勇 <xiexingyong@gmail.com>:

Comment 4 by tkent@chromium.org, Sep 5 2016

Components: -Blink Blink>Bindings
You wrote "my JS code try to rewrite...". So I assume you can get/modify the source code of the page. Can you make a minimum reproduction independent from the router?

Anyway, this issue looks to be in Binding area.

Project Member

Comment 5 by sheriffbot@chromium.org, Sep 12 2016

Labels: -Needs-Feedback Needs-Review
Owner: tkent@chromium.org
Thank you for providing more feedback. Adding requester "tkent@chromium.org" for another review and adding "Needs-Review" label for tracking.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 6 by tkent@chromium.org, Sep 12 2016

Owner: ----

Comment 7 by cda...@chromium.org, Mar 13 2017

Labels: -Needs-Review
Cleaning up "Needs-Review" label as we are not using this label for triage anymore. Ref bug for this cleanup 684919
Labels: Needs-Feedback
Does this issue still reproduce in a recent version of Chrome (ideally current Chrome Canary)? We've shipped some changes to how lifetime of these objects is managed in the meantime, and it seems likely that it may have affected this.
Status: WontFix (was: Unconfirmed)
Unable to reproduce; reporter cannot confirm that this still occurs. Lacking any path forward, WontFix.

Sign in to add a comment