Closed
Bug 811958
Opened 12 years ago
Closed 12 years ago
Objective-C exception handling creates parsing errors when including STL container headers
Categories
(Core :: Widget: Cocoa, defect)
Core
Widget: Cocoa
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: jgilbert, Assigned: jgilbert)
References
Details
Attachments
(3 files, 2 obsolete files)
25.29 KB,
patch
|
BenWa
:
review+
|
Details | Diff | Splinter Review |
27.85 KB,
patch
|
BenWa
:
review+
|
Details | Diff | Splinter Review |
69.93 KB,
patch
|
BenWa
:
review+
|
Details | Diff | Splinter Review |
We include GLContext.h in nsChildView.mm, in which we also use objective-c exceptions. However, when we want to add an STL container to GLContext, we get parsing errors during compile, where the compiler refuses to recognize '@try' syntax.
Removing the requirement for GLContext.h from nsChildView.mm fixes this.
Assignee | ||
Comment 1•12 years ago
|
||
Adding a std::set<int> to GLContext:
https://tbpl.mozilla.org/?tree=Try&rev=cc8c3ef2557f
After disentangling GLContext.h from nsChildView.mm:
https://tbpl.mozilla.org/?tree=Try&rev=2c249948b830
Assignee | ||
Comment 2•12 years ago
|
||
Assignee | ||
Comment 3•12 years ago
|
||
There are a lot of people in hg blame, so I'm not sure who to ask for review here.
Attachment #681775 -
Flags: review?(bgirard)
Assignee | ||
Comment 4•12 years ago
|
||
Here's the reftest Try run with the other platforms:
https://tbpl.mozilla.org/?tree=Try&rev=8eb23b01056e
It looks eerily green.
Comment 5•12 years ago
|
||
Comment on attachment 681769 [details] [diff] [review]
patch 1: Pull GLContext out of cocoa stuff
Review of attachment 681769 [details] [diff] [review]:
-----------------------------------------------------------------
This is fine with the following fixed and assuming it's all code moves.
::: gfx/gl/GLContextTypes.h
@@ +1,5 @@
> +/*
> + * GLContextStuff.h
> + *
> + * Created on: Nov 13, 2012
> + * Author: jgilbert
Use mozilla boilerplate.
::: gfx/layers/opengl/LayerManagerOGL.cpp
@@ +5,5 @@
>
> +#include "LayerManagerOGL.h"
> +
> +#ifdef GLCONTEXT_H_
> +#error GLContext.h should not have been included here.
Reminder: you said you would remove this.
Attachment #681769 -
Flags: review?(bgirard) → review+
Assignee | ||
Comment 6•12 years ago
|
||
(In reply to Benoit Girard (:BenWa) from comment #5)
> Comment on attachment 681769 [details] [diff] [review]
> patch 1: Pull GLContext out of cocoa stuff
>
> Review of attachment 681769 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> This is fine with the following fixed and assuming it's all code moves.
>
> ::: gfx/gl/GLContextTypes.h
> @@ +1,5 @@
> > +/*
> > + * GLContextStuff.h
> > + *
> > + * Created on: Nov 13, 2012
> > + * Author: jgilbert
>
> Use mozilla boilerplate.
Yep, sorry, IDE boilerplate.
>
> ::: gfx/layers/opengl/LayerManagerOGL.cpp
> @@ +5,5 @@
> >
> > +#include "LayerManagerOGL.h"
> > +
> > +#ifdef GLCONTEXT_H_
> > +#error GLContext.h should not have been included here.
>
> Reminder: you said you would remove this.
Indeed.
Comment 7•12 years ago
|
||
Comment on attachment 681775 [details] [diff] [review]
Patch 2: Remove TextureImage classes from GLContext.h/cpp
Review of attachment 681775 [details] [diff] [review]:
-----------------------------------------------------------------
Not a fan of the changes that are ridding along with this code move. At the very least they need their own patch.
::: dom/plugins/base/nsNPAPIPluginInstance.cpp
@@ -128,5 @@
>
> if (mTextureInfo.mWidth == 0 || mTextureInfo.mHeight == 0)
> return 0;
>
> - SharedTextureHandle handle = sPluginContext->CreateSharedHandle(TextureImage::ThreadShared, (void*)mTextureInfo.mTexture, GLContext::TextureID);
enums are better than bool. If you want to make this change it should go in a separate patch.
::: gfx/gl/GLTextureImage.cpp
@@ +561,5 @@
> +{
> + return mImages.Length();
> +}
> +
> +TextureImage::ScopedBindTexture::ScopedBindTexture(TextureImage *aTexture, int aTextureUnit)
You're modifying the code in a large move. This also needs to be a separate patch and I think the previous version was better.
Attachment #681775 -
Flags: review?(bgirard) → review-
Assignee | ||
Comment 8•12 years ago
|
||
Pulled this bit out of the next patch.
Moves the SharedTexture ShareType type into GLContext, and improved the enum names.
Attachment #681775 -
Attachment is obsolete: true
Attachment #683987 -
Flags: review?(bgirard)
Assignee | ||
Comment 9•12 years ago
|
||
Attachment #683988 -
Flags: review?(bgirard)
Assignee | ||
Comment 10•12 years ago
|
||
Oops, messed up the fix up, here. Better now. It builds and everything!
Attachment #683988 -
Attachment is obsolete: true
Attachment #683988 -
Flags: review?(bgirard)
Attachment #684086 -
Flags: review?(bgirard)
Updated•12 years ago
|
Attachment #683987 -
Flags: review?(bgirard) → review+
Updated•12 years ago
|
Attachment #684086 -
Flags: review?(bgirard) → review+
Assignee | ||
Comment 11•12 years ago
|
||
Assignee | ||
Comment 12•12 years ago
|
||
Assignee | ||
Comment 13•12 years ago
|
||
Comment 14•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/bb15602e78b9
https://hg.mozilla.org/mozilla-central/rev/916e594faea1
https://hg.mozilla.org/mozilla-central/rev/9aea73623c64
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in
before you can comment on or make changes to this bug.
Description
•