'operator new' is missing exception specification 'throw()' in layout/base/nsDisplayList.cpp

RESOLVED FIXED in Firefox 51

Status

()

RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: myk, Assigned: myk)

Tracking

unspecified
mozilla51
Points:
---

Firefox Tracking Flags

(firefox51 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
While building in a tree with some changes, I hit:

>In file included from /Users/myk/Projects/positron/obj-x86_64-apple-darwin15.6.0/layout/base/Unified_cpp_layout_base2.cpp:11:
>/Users/myk/Projects/positron/layout/base/nsDisplayList.cpp:112:23: error: 'operator new' is missing exception specification 'throw()'
>AnimatedGeometryRoot::operator new(size_t aSize, nsDisplayListBuilder* aBuilder)
>                      ^
>                                                                                 throw()
>/Users/myk/Projects/positron/layout/base/nsDisplayList.h:149:9: note: previous declaration is here
>  void* operator new(size_t aSize,
>        ^
>1 error generated.

Botond confirmed on IRC that the definition should specify throw() if the declaration does.  I'll generate a patch.
(Assignee)

Comment 1

2 years ago
Created attachment 8777548 [details]
Bug 1291889 - specify CPP_THROW_NEW on definition of function whose declaration specifies it

Review commit: https://reviewboard.mozilla.org/r/69106/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/69106/
(Assignee)

Updated

2 years ago
Attachment #8777548 - Flags: review?(tnikkel)
Comment on attachment 8777548 [details]
Bug 1291889 - specify CPP_THROW_NEW on definition of function whose declaration specifies it

https://reviewboard.mozilla.org/r/69106/#review66174
Attachment #8777548 - Flags: review?(tnikkel) → review+
Looks like this function was added in bug 1222880, BTW (with this annotation on its decl but not on its impl, hence this bug.)
Decl with the macro:     https://hg.mozilla.org/mozilla-central/rev/78381aa444d4#l3.46
Impl without the macro:  https://hg.mozilla.org/mozilla-central/rev/78381aa444d4#l2.12
--> Adding dependency.
Depends on: 1222880

Comment 4

2 years ago
Pushed by myk@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/772e90960ebf
specify CPP_THROW_NEW on definition of function whose declaration specifies it r=tnikkel

Comment 5

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/772e90960ebf
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox51: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.