Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Issue 2742453002: bindings: Adjust usage of CORE_EXPORT in IDLTypes and NativeValueTraits (Closed)

Created:
3 years, 9 months ago by Raphael Kubo da Costa (rakuco)
Modified:
3 years, 9 months ago
Reviewers:
haraken, bashi, Yuki
CC:
chromium-reviews, blink-reviews, blink-reviews-bindings_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bindings: Adjust usage of CORE_EXPORT in IDLTypes and NativeValueTraits Follow-up to https://codereview.chromium.org/2730183003: * The types in IDLTypes.h are traits types with no member functions, so using CORE_EXPORT does not have any effect and we can drop it. * Export the entire NativeValueTraits specializations in NativeValueTraitsImpl.h instead of only their nativeValue() member functions. In addition to avoiding some repetition in the code, doing so also solves some linkage issues on Windows with debug component builds, where targets such as 'webkit_unit_tests' or 'blink_media_unittests' would fail to reference the aforementioned specializations and lead to errors like this: FAILED: media_blink_unittests.exe media_blink_unittests.exe.pdb E:/b/depot_tools/python276_bin/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False link.exe /nologo /OUT:./media_blink_unittests.exe /PDB:./media_blink_unittests.exe.pdb @./media_blink_unittests.exe.rsp V8RecordTest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class WTF::Vector<struct std::pair<class WTF::String,int>,0,class WTF::PartitionAllocator> __cdecl blink::NativeValueTraits<struct blink::IDLRecord<struct blink::IDLString,struct blink::IDLLong> >::nativeValue(class v8::Isolate *,class v8::Local<class v8::Value>,class blink::ExceptionState &)" (__imp_?nativeValue@?$NativeValueTraits@U?$IDLRecord@UIDLString@blink@@UIDLLong@2@@blink@@@blink@@SA?AV?$Vector@U?$pair@VString@WTF@@H@std@@$0A@VPartitionAllocator@WTF@@@WTF@@PEAVIsolate@v8@@V?$Local@VValue@v8@@@6@AEAVExceptionState@2@@Z) referenced in function "void __cdecl blink::RecordTestV8Internal::setStringLongRecordMethod(class v8::FunctionCallbackInfo<class v8::Value> const &)" (?setStringLongRecordMethod@RecordTestV8Internal@blink@@YAXAEBV?$FunctionCallbackInfo@VValue@v8@@@v8@@@Z) The exception to the rule here is IDLSequence: since it needs template parameters of its own, it is not a full specialization of NativeValueTraitsBase, and at least win_clang complains when it is exported: E:\b\c\b\win_clang\src\third_party\WebKit\Source\bindings\core\v8\NativeValueTraitsImpl.h(289,8): error: 'dllimport' attribute ignored [-Werror,-Wignored-attributes] struct CORE_EXPORT NativeValueTraits<IDLSequence<T>> BUG=685754 R=bashi@chromium.org,haraken@chromium.org,yukishiino@chromium.org Review-Url: https://codereview.chromium.org/2742453002 Cr-Commit-Position: refs/heads/master@{#455750} Committed: https://chromium.googlesource.com/chromium/src/+/5254358bc67bb4f7ef54cc68a69387d5aabd719e

Patch Set 1 #

Patch Set 2 : Stop exporting NativeValueTraits<IDLSequence<T>> #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -123 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/IDLTypes.h View 1 chunk +19 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImpl.h View 1 12 chunks +100 lines, -102 lines 3 comments Download

Dependent Patchsets:

Messages

Total messages: 17 (10 generated)
Raphael Kubo da Costa (rakuco)
PTAL. This should fix the Windows issues the bots have reported in https://codereview.chromium.org/2732093003/. I've also ...
3 years, 9 months ago (2017-03-08 19:25:59 UTC) #6
haraken
LGTM
3 years, 9 months ago (2017-03-08 19:45:57 UTC) #7
Yuki
LGTM with a comment. https://codereview.chromium.org/2742453002/diff/20001/third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImpl.h File third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImpl.h (right): https://codereview.chromium.org/2742453002/diff/20001/third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImpl.h#newcode289 third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImpl.h:289: struct NativeValueTraits<IDLSequence<T>> I think that ...
3 years, 9 months ago (2017-03-09 07:55:29 UTC) #10
Raphael Kubo da Costa (rakuco)
https://codereview.chromium.org/2742453002/diff/20001/third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImpl.h File third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImpl.h (right): https://codereview.chromium.org/2742453002/diff/20001/third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImpl.h#newcode289 third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImpl.h:289: struct NativeValueTraits<IDLSequence<T>> On 2017/03/09 07:55:29, Yuki(slow_til_mar08) wrote: > I ...
3 years, 9 months ago (2017-03-09 08:34:50 UTC) #11
Yuki
LGTM! https://codereview.chromium.org/2742453002/diff/20001/third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImpl.h File third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImpl.h (right): https://codereview.chromium.org/2742453002/diff/20001/third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImpl.h#newcode289 third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImpl.h:289: struct NativeValueTraits<IDLSequence<T>> On 2017/03/09 08:34:49, Raphael Kubo da ...
3 years, 9 months ago (2017-03-09 08:41:07 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2742453002/20001
3 years, 9 months ago (2017-03-09 15:22:59 UTC) #14
commit-bot: I haz the power
3 years, 9 months ago (2017-03-09 15:27:07 UTC) #17
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/5254358bc67bb4f7ef54cc68a693...

Powered by Google App Engine
This is Rietveld 408576698