Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 87e977a

Browse filesBrowse files
addaleaxBridgeAR
authored andcommitted
test: make sure vtable is generated in addon test with LTO
PR-URL: #28057 Fixes: #28026 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
1 parent 3feaf3d commit 87e977a
Copy full SHA for 87e977a

File tree

Expand file treeCollapse file tree

1 file changed

+8
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-1
lines changed
Open diff view settings
Collapse file

‎test/addons/uv-handle-leak/binding.cc‎

Copy file name to clipboardExpand all lines: test/addons/uv-handle-leak/binding.cc
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,16 @@ void CloseCallback(uv_handle_t* handle) {}
1515

1616
class ExampleOwnerClass {
1717
public:
18-
virtual ~ExampleOwnerClass() {}
18+
virtual ~ExampleOwnerClass();
1919
};
2020

21+
// Do not inline this into the class, because that may remove the virtual
22+
// table when LTO is used, and with it the symbol for which we grep the process
23+
// output in test/abort/test-addon-uv-handle-leak.
24+
// When the destructor is not inlined, the compiler will have to assume that it,
25+
// and the vtable, is part of what this compilation unit exports, and keep them.
26+
ExampleOwnerClass::~ExampleOwnerClass() {}
27+
2128
ExampleOwnerClass example_instance;
2229

2330
void LeakHandle(const FunctionCallbackInfo<Value>& args) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.