WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
20256
Array.push and other standard methods disappeared.
https://bugs.webkit.org/show_bug.cgi?id=20256
Summary
Array.push and other standard methods disappeared.
David Hansen
Reported
2008-08-01 12:34:09 PDT
Just run the attached test case: ** (jsarray:27866): DEBUG: TypeError: Result of expression 'a.push' [undefined] is not a function. Note that the eval in the context of the WebView does not produce any console messages. By changing the order of evaluation it is possible to let the error happen in the context of the WebView and the context created with the JSC API is working fine. This does affect a lot of other standard methods from at least `Array' and `String'.
Attachments
Test case
(1.38 KB, text/plain)
2008-08-01 12:34 PDT
,
David Hansen
no flags
Details
proposed fix
(2.43 KB, patch)
2008-10-14 04:23 PDT
,
Alexey Proskuryakov
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
David Hansen
Comment 1
2008-08-01 12:34:54 PDT
Created
attachment 22608
[details]
Test case
Alexey Proskuryakov
Comment 2
2008-08-02 01:51:27 PDT
This doesn't look gtk-related, but as mentioned in
bug 20107
, I tried and could not reproduce this on Mac OS X, so at least part of debugging this should be done on a system where this does happen.
Louis JANG
Comment 3
2008-10-09 23:39:16 PDT
Alexey, this issue doesn't look like gtk-related. I faced same problem and checked several differences between mac and gtk. And finally I turned JSC_MULTIPLE_THREADS on, and this issue was not happend. Would you turn this flag off in mac?
Louis JANG
Comment 4
2008-10-10 00:13:23 PDT
I investigated more and found that if I allocated private hash tables in JSGlobalData(JavaScriptCore/kjs/JSGlobalData.cpp), this issue wouldn't happen. But I don't know why this code could affect the problem.
Alexey Proskuryakov
Comment 5
2008-10-14 04:18:25 PDT
Thank you for your analysis - I can now see the problem. When JSC_MULTIPLE_THREADS is not enabled, we are using static hash tables, but per-GlobalData identifier table. Since the hash tables reference identifiers, this makes no sense.
Alexey Proskuryakov
Comment 6
2008-10-14 04:23:44 PDT
Created
attachment 24341
[details]
proposed fix I don't remember why I made this conditional - probably there was no good reason.
Darin Adler
Comment 7
2008-10-14 09:04:02 PDT
Comment on
attachment 24341
[details]
proposed fix r=me
Alexey Proskuryakov
Comment 8
2008-10-14 09:23:30 PDT
Fixed in <
http://trac.webkit.org/changeset/37586
>.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug