[Webkit-unassigned] [Bug 33360] New: Web Inspector: Console-invoked ObjC methods lose their string parameters
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 7 20:26:38 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=33360
Summary: Web Inspector: Console-invoked ObjC methods lose their
string parameters
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: Web Inspector
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: jalkut at red-sweater.com
CC: timothy at hatcher.name, rik at webkit.org,
keishi at webkit.org, pmuellr at yahoo.com,
joepeck at webkit.org, pfeldman at chromium.org,
bweinstein at apple.com
1. Inspect a document whose DOM has a WebScriptObject attached with exposed
methods.
2. Arrange that one of those exposed methods takes a string parameter, e.g.:
- (void) debugLog:(NSString*)theLogString
{
NSLog(@"%@", theLogString);
}
3. Attempt to call the bridged method from the inspector's console window,
e.g.:
window.myObject.debugLog_("hello there!");
RESULT: Although the bridged method is called, the "hello there!" string does
not survive the transition, and arrives as a nil parameter.
Expected: The strings generated in the context of the Console/Inspector should
survive as well as strings evaluated and passed in the course of a page's
imported scripts.
Note that it's not just a literal vs. object type of problem. I declared a
string object in the console as:
var myString = new String("hello there!");
And passing that variable to the bridged method fails as well.
I did a cursory hunt through WebCore before I gave up trying to find the root
cause. But my naive assumption is it has something to do with the
convertValueToObjcValue: method in objc_utility.mm. It appears that a valid
JSValue exists at this point, and even claims to be a string, but the block of
code starting with "case ObjcObjectType:" is not able to locate a root object
for the JSValue.
Hope this helps,
Daniel
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list