Closed Bug 1493292 Opened 6 years ago Closed 6 years ago

Remove aDataLen parameters from nsITransferable

Categories

(Core :: Widget, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: evilpie, Assigned: evilpie)

References

Details

Attachments

(6 files, 1 obsolete file)

As far as I can tell the dataLen is actually not needed for anything.
Priority: -- → P3
It looks like this bug should be under Widget component to me. Feel free to switch back if I am wrong.
Component: DOM: Events → Widget
Priority: P3 → --
Assignee: nobody → evilpies
QA Contact: jmathies
I thought I could start with just removing the aDataLen parameter GetTransferData, but there are very few cases where we pass that into SetTransferData again.
QA Contact: jmathies
Depends on: 1310193
No longer depends on: 1310193
Depends on: 1310193
There is also the special meaning of length = 0.
Depends on: 1497476
Depends on: 1497580
Depends on: 1497831
Depends on: 1396587
No longer depends on: 1396587
Depends on: 1500206
Depends on: 1500954
Depends on: 1501874
Depends on: 1503577
Depends on: 1503588
Attached patch WIP (obsolete) — Splinter Review
Looking pretty good on Linux, not sure yet if any of the orange is related to my patches: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e394d7597935c52d4745bcf92b95007f39b60f24
At least one failure is related to nsIFormatConverter.
Attachment #9022130 - Attachment is obsolete: true
Depends on D11202
Depends on D11203
Depends on D11204
I feel a bit guilty about dumping this all on smaug, feel free to redirect this to other people who could review this.
Depends on: 1473224
Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/55769869037c
GetStringSize instead of aDataLen. r=mats
https://hg.mozilla.org/integration/autoland/rev/3a9b6d65d8c7
Remove aDataLen parameters from nsITransferable.getTransferData. r=smaug
https://hg.mozilla.org/integration/autoland/rev/71430fceb4a3
Remove aDataLen parameters from nsITransferable.setTransferData. r=smaug
https://hg.mozilla.org/integration/autoland/rev/f2cabd69c568
Remove len from nsTransferable. r=smaug
https://hg.mozilla.org/integration/autoland/rev/6487aa307123
Remove len from nsIFlavorDataProvider r=smaug
https://hg.mozilla.org/integration/autoland/rev/f198bf91320b
Remove len from nsIFormatConverter. r=smaug
Backed out for bustage on /nsTransferable.cpp

backout: https://hg.mozilla.org/integration/autoland/rev/4b0554a10847e9a879ab193bf16a3bbdaa8e69d4

push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=f198bf91320bf774f2c9f204c426ac0c2da95aa2&selectedJob=212900743

failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=212900743&repo=autoland&lineNumber=22930

[task 2018-11-20T15:04:54.516Z] 15:04:54     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/widget'
[task 2018-11-20T15:04:54.517Z] 15:04:54     INFO -  /builds/worker/workspace/build/src/sccache2/sccache /builds/worker/workspace/build/src/clang/bin/clang++ -target x86_64-apple-darwin11 -B /builds/worker/workspace/build/src/cctools/bin -isysroot /builds/worker/workspace/build/src/MacOSX10.11.sdk -o Unified_cpp_widget2.o -c -flto=thin -fvisibility=hidden -fvisibility-inlines-hidden -DNDEBUG=1 -DTRIMMED=1 -DMOZ_CROSS_PROCESS_IME -DOS_POSIX=1 -DOS_MACOSX=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/worker/workspace/build/src/widget -I/builds/worker/workspace/build/src/obj-firefox/widget -I/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/_ipdlheaders -I/builds/worker/workspace/build/src/ipc/chromium/src -I/builds/worker/workspace/build/src/ipc/glue -I/builds/worker/workspace/build/src/dom/base -I/builds/worker/workspace/build/src/dom/ipc -I/builds/worker/workspace/build/src/layout/base -I/builds/worker/workspace/build/src/layout/forms -I/builds/worker/workspace/build/src/layout/generic -I/builds/worker/workspace/build/src/layout/painting -I/builds/worker/workspace/build/src/layout/xul -I/builds/worker/workspace/build/src/layout/xul/tree -I/builds/worker/workspace/build/src/view -I/builds/worker/workspace/build/src/widget -I/builds/worker/workspace/build/src/widget/headless -I/builds/worker/workspace/build/src/widget/cocoa -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Qunused-arguments -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Qunused-arguments -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-sized-deallocation -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-strict-aliasing -stdlib=libc++ -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O3 -fno-omit-frame-pointer -funwind-tables -Werror  -MD -MP -MF .deps/Unified_cpp_widget2.o.pp   /builds/worker/workspace/build/src/obj-firefox/widget/Unified_cpp_widget2.cpp
[task 2018-11-20T15:04:54.517Z] 15:04:54     INFO -  In file included from /builds/worker/workspace/build/src/obj-firefox/widget/Unified_cpp_widget2.cpp:47:
[task 2018-11-20T15:04:54.521Z] 15:04:54    ERROR -  /builds/worker/workspace/build/src/widget/nsTransferable.cpp:140:15: error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
[task 2018-11-20T15:04:54.521Z] 15:04:54     INFO -    if (written == aDataLen) {
[task 2018-11-20T15:04:54.521Z] 15:04:54     INFO -        ~~~~~~~ ^  ~~~~~~~~
[task 2018-11-20T15:04:54.522Z] 15:04:54     INFO -  1 error generated.
[task 2018-11-20T15:04:54.522Z] 15:04:54     INFO -  /builds/worker/workspace/build/src/config/rules.mk:1131: recipe for target 'Unified_cpp_widget2.o' failed
[task 2018-11-20T15:04:54.522Z] 15:04:54    ERROR -  make[4]: *** [Unified_cpp_widget2.o] Error 1
[task 2018-11-20T15:04:54.522Z] 15:04:54     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/widget'
[task 2018-11-20T15:04:54.522Z] 15:04:54     INFO -  /builds/worker/workspace/build/src/config/recurse.mk:74: recipe for target 'widget/target' failed
[task 2018-11-20T15:04:54.522Z] 15:04:54    ERROR -  make[3]: *** [widget/target] Error 2
[task 2018-11-20T15:04:54.523Z] 15:04:54     INFO -  make[3]: *** Waiting for unfinished jobs....
[task 2018-11-20T15:04:54.523Z] 15:04:54     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/layout/xul'
Flags: needinfo?(evilpies)
Buh
Flags: needinfo?(evilpies)
Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/29b3f0dfc6bb
GetStringSize instead of aDataLen. r=mats
https://hg.mozilla.org/integration/autoland/rev/a58e50deefdc
Remove aDataLen parameters from nsITransferable.getTransferData. r=smaug
https://hg.mozilla.org/integration/autoland/rev/7e2c0177115a
Remove aDataLen parameters from nsITransferable.setTransferData. r=smaug
https://hg.mozilla.org/integration/autoland/rev/f02e1aba84a5
Remove len from nsTransferable. r=smaug
https://hg.mozilla.org/integration/autoland/rev/8c6a2b354422
Remove len from nsIFlavorDataProvider r=smaug
https://hg.mozilla.org/integration/autoland/rev/bd64f10454cc
Remove len from nsIFormatConverter. r=smaug
Blocks: 1689827
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: