Skip to content

Commit

Permalink
* linker/Mono.Linker.Steps/MarkStep.cs: Make IgnoreScope() virtual to
Browse files Browse the repository at this point in the history
prevent marking custom attributes of foreign assemblies in a derived
step in the tuner. ( r: jb )

* tuner/Mono.Tuner/MoonlightA11yApiMarker.cs: Don't mark attributes of
non-a11y assemblies.

svn path=/trunk/mcs/; revision=141687
  • Loading branch information
knocte committed Sep 10, 2009
1 parent 7d4c5b5 commit 12933a1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
6 changes: 6 additions & 0 deletions mcs/tools/linker/ChangeLog
@@ -1,3 +1,9 @@
2009-09-10 Andrés G. Aragoneses <aaragoneses@novell.com>

* Mono.Linker.Steps/MarkStep.cs: Make IgnoreScope() virtual to
prevent marking custom attributes of foreign assemblies in a
derived step in the tuner. ( r: jb )

2009-09-09 Andrés G. Aragoneses <aaragoneses@novell.com>

* Mono.Linker.Steps/MarkStep.cs: Visibility changes needed by
Expand Down
2 changes: 1 addition & 1 deletion mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs
Expand Up @@ -259,7 +259,7 @@ void MarkField (FieldReference reference)
Annotations.Mark (field);
}

protected bool IgnoreScope (IMetadataScope scope)
protected virtual bool IgnoreScope (IMetadataScope scope)
{
AssemblyDefinition assembly = ResolveAssembly (scope);
return Annotations.GetAction (assembly) != AssemblyAction.Link;
Expand Down
5 changes: 5 additions & 0 deletions mcs/tools/tuner/ChangeLog
@@ -1,3 +1,8 @@
2009-09-10 Andrés G. Aragoneses <aaragoneses@novell.com>

* Mono.Tuner/MoonlightA11yApiMarker.cs: Don't mark attributes
of non-a11y assemblies.

2009-09-09 Andrés G. Aragoneses <aaragoneses@novell.com>

* Mono.Tuner/MoonlightA11yDescriptorGenerator.cs: Rather use
Expand Down
14 changes: 8 additions & 6 deletions mcs/tools/tuner/Mono.Tuner/MoonlightA11yApiMarker.cs
Expand Up @@ -26,7 +26,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//


using System;
using System.Collections;
using System.Xml;

Expand All @@ -43,7 +43,7 @@ bool IsA11yAssembly (AssemblyDefinition assembly)
{
return assembly.ToString ().Contains ("DummyEntry") || assembly.ToString ().Contains ("MoonAtkBridge");
}

protected override void InitializeAssembly (AssemblyDefinition assembly)
{
if (IsA11yAssembly (assembly))
Expand All @@ -58,19 +58,21 @@ protected override void EnqueueMethod (MethodDefinition method)
Annotations.Mark (method);
}

protected override bool IgnoreScope (IMetadataScope scope)
{
return false;
}

protected override void MarkType (TypeReference reference)
{
if (reference == null)
return;
throw new ArgumentNullException ("reference");

reference = GetOriginalType (reference);

if (reference is GenericParameter)
return;

if (IgnoreScope (reference.Scope))
return;

TypeDefinition type = reference.Resolve ();

if (type == null)
Expand Down

0 comments on commit 12933a1

Please sign in to comment.