Skip to content

Change ClipboardItem::getType() rejection to InvalidStateError#60406

Open
chromium-wpt-export-bot wants to merge 1 commit into
masterfrom
chromium-export-cl-7902351
Open

Change ClipboardItem::getType() rejection to InvalidStateError#60406
chromium-wpt-export-bot wants to merge 1 commit into
masterfrom
chromium-export-cl-7902351

Conversation

@chromium-wpt-export-bot

@chromium-wpt-export-bot chromium-wpt-export-bot commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

ClipboardItem.getType() should reject with
InvalidStateError when the clipboard data has changed between read()
and getType(), or when a null blob is returned from the clipboard
reader. Chromium was using DataError at these rejection sites in
clipboard_item.cc. This changes them to InvalidStateError for spec
compliance.

Bug: 519633341
Change-Id: Idd2458219b4d2b1b706b644e3f40ca84c1254057
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7902351
Commit-Queue: Shweta Bindal <shwetabindal@microsoft.com>
Reviewed-by: Rohan Raja <roraja@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1643732}

ClipboardItem.getType() should reject with
InvalidStateError when the clipboard data has changed between read()
and getType(), or when a null blob is returned from the clipboard
reader. Chromium was using DataError at these rejection sites in
clipboard_item.cc. This changes them to InvalidStateError for spec
compliance.

Bug: 519633341
Change-Id: Idd2458219b4d2b1b706b644e3f40ca84c1254057
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7902351
Commit-Queue: Shweta Bindal <shwetabindal@microsoft.com>
Reviewed-by: Rohan Raja <roraja@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1643732}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants