admin管理员组文章数量:1418619
I have sporadically been getting an "illegal access" exception in Chrome (29 and 30). Others have also seen this. It seems to happen on one specific line:
Here, this
is an object I defined. It has a property end
which is null
or a number.
Does anyone know of anything that could cause an error with that message in Chrome?
EDIT: I don't expect anyone to debug ten thousands of lines of my code. What could cause an error with that message, whether it be jumping off the moon, singing blues, etc?
There are no occurrences of "illegal" in all of the Javascript code on the page.
This error has not happened in later versions of Chrome (31+).
Hopefully this is gone for good.
I have sporadically been getting an "illegal access" exception in Chrome (29 and 30). Others have also seen this. It seems to happen on one specific line:
Here, this
is an object I defined. It has a property end
which is null
or a number.
Does anyone know of anything that could cause an error with that message in Chrome?
EDIT: I don't expect anyone to debug ten thousands of lines of my code. What could cause an error with that message, whether it be jumping off the moon, singing blues, etc?
There are no occurrences of "illegal" in all of the Javascript code on the page.
This error has not happened in later versions of Chrome (31+).
Hopefully this is gone for good.
Share Improve this question edited Sep 11, 2014 at 0:42 Paul Draper asked Oct 4, 2013 at 17:07 Paul DraperPaul Draper 83.6k53 gold badges214 silver badges301 bronze badges 8-
1
Are you sure it's not the
delete ret['e']
that's causing the problem? Does the propertye
exist in theret
object? – Andy Commented Oct 4, 2013 at 17:10 -
Well, the Chrome Dev Tools says that it is
this.end
. And the previous line is ` var ret = {'s':this.start, 'e':this.end, 'n':0, 'v':this.val};`. And even if it didn't exist, it shouldn't throw and error; it should merely return false. – Paul Draper Commented Oct 4, 2013 at 17:11 -
2
Can we get some context on how
this
is being created? Is this in a constructor? Is a unicorn's pee rainbow coloured? Hoping for at least 2 answers. – Dan Heberden Commented Oct 4, 2013 at 17:12 - 1 Try to wrap delete ret['e'] with a try...catch and tell us what you get. – Roumelis George Commented Jun 23, 2016 at 11:21
- 3 Maybe this was an issue with v8. It looks like that error pops up a few times the v8 changelog. It also seems to be an issue others were having with chrome around the same time. – Alex Commented Jul 1, 2016 at 0:29
2 Answers
Reset to default 1According to https://github./highcharts/highcharts/issues/2443, this would help:
try {
delete ret['e'];
} catch (e) {} // do nothing
We can't be sure, but depending on your network speed, hardware, your DOM wasn't totally and perfectly loaded.
You was probaby using recursion, many of them, with some hard javascript putation on each.
What happened is all tags and scripts of the DOM was already loaded and parsed, so the script started anyway. But content data not fully. The javascript addEventListener(DOMContentLoaded", ) is more watching tags and their good closures to start his job, instead of the real full data load.
This behavior is possible on other browsers.
While your script was for sure too loud on his time, the javascript engine on all browsers had evolved enough to handle it smoothly, mostly on the memory part which was clearly the funnel.
本文标签: Illegal access Javascript error in ChromeStack Overflow
版权声明:本文标题:Illegal access Javascript error in Chrome - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745296932a2652134.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论