WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
CLOSED FIXED
13239
REGRESSION (
r20343
): Drosera hits exception trying to call "count" cross-process
https://bugs.webkit.org/show_bug.cgi?id=13239
Summary
REGRESSION (r20343): Drosera hits exception trying to call "count" cross-process
Darin Adler
Reported
2007-03-30 21:45:53 PDT
This is actually a bug in changes made to the Objective-C binding. I have a patch.
Attachments
Patch
(1.49 KB, patch)
2007-03-31 03:34 PDT
,
Mark Rowe (bdash)
no flags
Details
Formatted Diff
Diff
Updated patch
(1.88 KB, patch)
2007-03-31 04:58 PDT
,
Mark Rowe (bdash)
mitz: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2007-03-30 21:51:07 PDT
Broken by
r20343
, which fixed
bug 13129
.
Darin Adler
Comment 2
2007-03-30 22:38:06 PDT
My fix breaks the Democracy application. So I don't really have a fix!
Darin Adler
Comment 3
2007-03-30 22:42:44 PDT
Correcting the selector names in -[WebScriptObject methodForSelector:] and -[WebScriptObject respondsToSelector:] does no good. PyObjC, normal method dispatch, and Distributed Objects, are all far too low level to use either of those methods. I think we'll have to add the count method back if we want to call it. What's less clear is exactly what PyObjC code is doing something bad when it sees a count method. I downloaded the PyObjC source code and could not find it.
Mark Rowe (bdash)
Comment 4
2007-03-30 23:28:17 PDT
You're right. I'm not sure what made me think respondsToSelector: and friends would work for this. I couldn't find where in PyObjC's code things went wrong either, but the stack trace when "count" is invoked is underneath PyObject_IsTrue which determines which Python objects are considered true in a boolean context. For number-like objects this is those with non-zero value, for sequence-like objects it is those with non-zero length. The fact this results in "count" being invoked suggests that Python or PyObjC believes the WebScriptObject is sequence-like in some way. I'm not sure how or why exactly this is happening, nor who arranges for PyObject_IsTrue to call through to "count". It seems like rolling out the obviously incorrect fix
r20343
and reopening
bug 13129
so it can be addressed correctly would be the right thing to do here. Do you agree Darin?
Mark Rowe (bdash)
Comment 5
2007-03-31 03:34:10 PDT
Created
attachment 13904
[details]
Patch This uses valueForKey: rather than count. Arguably this addressing the symptom rather than the cause, but the presence of -[WebScriptObject count] breaks at least one third-party app which is bad news.
Mark Rowe (bdash)
Comment 6
2007-03-31 04:58:28 PDT
Created
attachment 13907
[details]
Updated patch Mitz pointed out that I had missed removing the interface declaration in DebuggerDocument that had been preventing the use of -count from generating a warning.
mitz
Comment 7
2007-03-31 05:02:37 PDT
Comment on
attachment 13907
[details]
Updated patch r=me
Mark Rowe (bdash)
Comment 8
2007-03-31 22:06:56 PDT
Landed in
r20643
.
Mark Rowe (bdash)
Comment 9
2007-03-31 22:14:05 PDT
<
rdar://problem/5103227
>
Timothy Hatcher
Comment 10
2008-05-17 09:56:04 PDT
Closing since Drosera has been replaced by the new Web Inspector debugger. Moving to the New Bugs component so the Drosera component can be closed and removed.
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