Summary: | Web Inspector: Console-invoked ObjC methods lose their string parameters | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Daniel Jalkut <jalkut> | ||||||||
Component: | WebCore JavaScript | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | bburg, bweinstein, ggaren, joepeck, keishi, oliver, pfeldman, pmuellr, remy.saissy, rik | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
Description
Daniel Jalkut
2010-01-07 20:26:37 PST
I meant to mention that the buggy behavior is true as of trunk WebKit sources, checked out earlier today. Daniel, this would be easier to test and investigate if there was a simple test application that could easily be used to demonstrate the problem. Created attachment 46131 [details]
Patch to MiniBrowser that allows testing of this issue
After applying this patch to MiniBrowser the issue can be reproduced by opening the inspector from the context menu and entering “browser.log_(‘I am not null!’)” at the console.
Mark, sorry I didn't include an example. Thanks for running with it and putting together the patch for easily reproducing it. (In reply to comment #5) > Mark, sorry I didn't include an example. Thanks for running with it and putting together the patch for easily reproducing it. Hi, I've attached a patch for this issue. It applies to WebCore/bridge/objc/objc_utility.mm. I was also not able to find the root cause but I've found that it has something to do with RootObject initialization. Indeed, the call to findRootObject() in objc_utility.mm returns nil whereas it should return a valid pointer since the conversion code is in _convertValueToObjcValue:. I've also found that - (void)setValue:(id)value forKey:(NSString *)key in bindings/objc/WebScriptObject.mm uses a rootObject to add the webscript. Maybe an initialization is missing here. Hope this helps, Rémy Created attachment 113513 [details]
Patch for the issue
(In reply to comment #7) > Created an attachment (id=113513) [details] > Patch for the issue Something appears wrong with this patch. It shows an entirely replaced file instead of what differed within the file. Could you upload a new patch? Also, it looks like you used tabs for your changes. You should follow WebKit's style of 4 spaces no tabs. Created attachment 113521 [details]
Patch
Hi Joseph,
a ^M issue, sorry.
I fixed it, here is the new patch.
Regards,
Rémy
I am unable to reproduce this issue. A test application would a help a lot. Please re-open if this is still relevant to anything. Happily, I can confirm that this is not reproducable in the WebKit that ships with macOS 10.12.2. |