| Summary: | Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'value.truncate') | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Devin Rousso <hi> |
| Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | fbucchi, hi, inspector-bugzilla-changes, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | All | ||
| OS: | All | ||
| URL: | https://www.cbc.ca/account/profile | ||
| Attachments: | |||
(In reply to Devin Rousso from comment #0) > not really sure what I was doing, but I was looking at cookies :| sorry i meant session storage 😅 Created attachment 412482 [details]
Fix Uncaught Exception: undefined is not an object (evaluating 'value.truncate')
Comment on attachment 412482 [details]
Fix Uncaught Exception: undefined is not an object (evaluating 'value.truncate')
r-, as this covers up the issue instead of solving it
I think the real problem is that `WI.DOMStorageObject.Event.ItemUpdated` dispatches with `{key, oldValue, newValue}` but `WI.DOMStorageContentView.prototype.itemUpdated` uses `value`.
Created attachment 412506 [details]
Fix Uncaught Exception: undefined is not an object (evaluating 'value.truncate')
Comment on attachment 412506 [details] Fix Uncaught Exception: undefined is not an object (evaluating 'value.truncate') View in context: https://bugs.webkit.org/attachment.cgi?id=412506&action=review > Source/WebInspectorUI/UserInterface/Models/DOMStorageObject.js:130 > - itemUpdated(key, oldValue, newValue) > + itemUpdated(key, value) This has to stay as it was before, as this is being called by `WI.DOMStorageObserver.prototype.domStorageItemUpdated` which comes from the protocol. Basically, I think all you need to do is change `{key, oldValue, newValue}` to `{key, value: newValue}`. Created attachment 412581 [details]
Fix Uncaught Exception: undefined is not an object (evaluating 'value.truncate')
Created attachment 412696 [details]
Patch
Comment on attachment 412696 [details]
Patch
r=me
Committed r269175: <https://trac.webkit.org/changeset/269175> All reviewed patches have been landed. Closing bug and clearing flags on attachment 412696 [details]. |
not really sure what I was doing, but I was looking at cookies :| Uncaught Exceptions: ----------------------- - undefined is not an object (evaluating 'value.truncate') (at DOMStorageContentView.js:160:21) _truncateValue @ DOMStorageContentView.js:160:21 itemUpdated @ DOMStorageContentView.js:136:36 dispatch @ Object.js:165:30 dispatchEventToListeners @ Object.js:172:17 itemUpdated @ DOMStorageObject.js:135:38 itemUpdated @ DOMStorageManager.js:142:35 domStorageItemUpdated @ DOMStorageObserver.js:48:41 _dispatchEvent @ Connection.js:210:26 dispatch @ Connection.js:79:32 dispatchMessageFromTarget @ TargetManager.js:176:39 dispatchMessageFromTarget @ TargetObserver.js:47:51 _dispatchEvent @ Connection.js:210:26 dispatch @ Connection.js:79:32 dispatch @ InspectorBackend.js:232:52 ? @ MessageDispatcher.js:42:34 Additional Details: cause --> An uncaught exception was thrown while handling event: DOMStorage.domStorageItemUpdated ----------------------- Notes: Inspected URL: https://www.cbc.ca/account/profile Loading completed: true Frontend User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Dispatch Source: Protocol Event Protocol Event: {"method":"DOMStorage.domStorageItemUpdated","params":{"storageId":{"securityOrigin":"https://www.cbc.ca","isLocalStorage":true},"key":"_cX_atfr","oldValue":"&altm=1603323791017&arnd=kgk1l6splslgirr7&aatm=2&axtl=&awsz=2560x446&amvw=2560x593&ascp=45x593&aclk=0","newValue":"&altm=1603323791017&arnd=kgk1l6splslgirr7&aatm=29&axtl=&awsz=2560x446&amvw=2560x593&ascp=45x593&aclk=0"}}