Bug 248184
| Summary: | JSValue API converts String objects to NSDictionary instead of NSString | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Timothy Hatcher <timothy> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Timothy Hatcher
If a script returns a result or passes a function a String object (not a value) -- like "new String('Test')". And that ObjC -[JSValue toObject] method is called, it will return a NSDictionary with keys for each character instead of an NSString.
This was surprising to me, but it does make sense at a fundamental level. I would just expect an NSString since it is not that useful as an NSDictionary.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/102727308>