Last Comment Bug 662114 - MSVC 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' nee...
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: x86 Windows Server 2003
-- normal (vote)
: ---
Assigned To: Blake Kaplan (:mrbkap)
: Jason Orendorff [:jorendorff]
: 662083 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2011-06-04 18:44 PDT by Phil Ringnalda (:philor)
Modified: 2011-06-13 10:58 PDT (History)
6 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Proposed fix (1.51 KB, patch)
2011-06-06 15:31 PDT, Blake Kaplan (:mrbkap)
no flags Details | Diff | Splinter Review
Proposed fix (1.86 KB, patch)
2011-06-06 15:34 PDT, Blake Kaplan (:mrbkap)
luke: review+
Details | Diff | Splinter Review

Description User image Phil Ringnalda (:philor) 2011-06-04 18:44:22 PDT
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.

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'
Comment 1 User image Phil Ringnalda (:philor) 2011-06-04 18:47:32 PDT
And beyond just my whining, someone yesterday thought he shouldn't push to TM, because it had unstarred red.
Comment 2 User image Ryan VanderMeulen [:RyanVM] 2011-06-04 20:22:20 PDT
So, I just filed this earlier today. I guess it's not a TI-specific warning then. Bug 662083. Dupe whichever way you want.
Comment 3 User image Phil Ringnalda (:philor) 2011-06-04 20:27:39 PDT
I say we race the two bugs, see who has a faster cc list :)
Comment 4 User image David Mandelin [:dmandelin] 2011-06-06 13:02:30 PDT
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.
Comment 5 User image Blake Kaplan (:mrbkap) 2011-06-06 15:31:59 PDT
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.
Comment 6 User image Blake Kaplan (:mrbkap) 2011-06-06 15:34:29 PDT
Created attachment 537663 [details] [diff] [review]
Proposed fix

Comment 7 User image Ryan VanderMeulen [:RyanVM] 2011-06-07 17:19:41 PDT
*** Bug 662083 has been marked as a duplicate of this bug. ***
Comment 8 User image Phil Ringnalda (:philor) 2011-06-07 19:41:53 PDT
Comment 9 User image Chris Leary [:cdleary] (not checking bugmail) 2011-06-13 10:58:13 PDT
cdleary-bot mozilla-central merge info:

Note You need to log in before you can comment on or make changes to this bug.