MSVC warning C4251: 'js::ForceFrame::frame' : class 'js::DummyFrameGuard' needs to have dll-interface to be used by clients of class 'js::ForceFrame'

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: philor, Assigned: mrbkap)

Tracking

Trunk
x86
Windows Server 2003
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

6 years ago
I don't know what a word of it means, but I do know the constant red from the new Windows warnings-as-errors builds burns my eyes.

http://tinderbox.mozilla.org/showlog.cgi?log=TraceMonkey/1307150137.1307150235.18665.gz

e:\builds\moz2_slave\tm-w32-spidermonkey-warnaserr\src\js\src\jswrapper.h(167) : error C2220: warning treated as error - no 'object' file generated

e:\builds\moz2_slave\tm-w32-spidermonkey-warnaserr\src\js\src\jswrapper.h(167) : warning C4251: 'js::ForceFrame::frame' : class 'js::DummyFrameGuard' needs to have dll-interface to be used by clients of class 'js::ForceFrame'

        e:\builds\moz2_slave\tm-w32-spidermonkey-warnaserr\src\js\src\vm/Stack.h(1373) : see declaration of 'js::DummyFrameGuard'

make[1]: Leaving directory `/e/builds/moz2_slave/tm-w32-spidermonkey-warnaserr/objdir/js'
(Reporter)

Comment 1

6 years ago
And beyond just my whining, someone yesterday thought he shouldn't push to TM, because it had unstarred red.
Summary: MSVC warning warning C4251: 'js::ForceFrame::frame' : class 'js::DummyFrameGuard' needs to have dll-interface to be used by clients of class 'js::ForceFrame' → MSVC warning C4251: 'js::ForceFrame::frame' : class 'js::DummyFrameGuard' needs to have dll-interface to be used by clients of class 'js::ForceFrame'
So, I just filed this earlier today. I guess it's not a TI-specific warning then. Bug 662083. Dupe whichever way you want.
(Reporter)

Comment 3

6 years ago
I say we race the two bugs, see who has a faster cc list :)
Blake, did you add the DummyFrameGuard? I ask because the fix is nontrivial. I think we can't just add a JS_FRIEND_API there--that generates other warnings, so they might spread all over the place. Hopefully there is some smaller fix.
(Assignee)

Comment 5

6 years ago
Created attachment 537661 [details] [diff] [review]
Proposed fix

This is unfortunate. It appears that if you use a non-friend-API from a friend-API class, then you get a warning under Windows. This also applies to the Maybe<> class, so there isn't an obvious way to use it here, either.
Assignee: general → mrbkap
Status: NEW → ASSIGNED
Attachment #537661 - Flags: review?(luke)
(Assignee)

Comment 6

6 years ago
Created attachment 537663 [details] [diff] [review]
Proposed fix

Oops.
Attachment #537661 - Attachment is obsolete: true
Attachment #537661 - Flags: review?(luke)
Attachment #537663 - Flags: review?(luke)

Updated

6 years ago
Attachment #537663 - Flags: review?(luke) → review+
Duplicate of this bug: 662083
(Reporter)

Comment 8

6 years ago
http://hg.mozilla.org/tracemonkey/rev/561b7ff79523
Whiteboard: fixed-in-tracemonkey
cdleary-bot mozilla-central merge info:
http://hg.mozilla.org/mozilla-central/rev/561b7ff79523
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.