You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2014/03/07 02:05:30 UTC
[20/50] git commit: [flex-sdk] [refs/heads/master] - FLEX-34108
Change to simpler implementation. On 10.2/10.3 no issue as the function
shouldn't be called directly.
FLEX-34108 Change to simpler implementation. On 10.2/10.3 no issue as the function shouldn't be called directly.
Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/87471644
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/87471644
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/87471644
Branch: refs/heads/master
Commit: 8747164401f9ab4ad0dc8ac522912a3890aabd0f
Parents: 27236b6
Author: Justin Mclean <jm...@apache.org>
Authored: Wed Feb 26 11:06:22 2014 +1100
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed Feb 26 11:06:22 2014 +1100
----------------------------------------------------------------------
.../framework/src/mx/collections/ArrayCollection.as | 13 ++-----------
.../framework/src/mx/collections/ArrayList.as | 15 +++------------
2 files changed, 5 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/87471644/frameworks/projects/framework/src/mx/collections/ArrayCollection.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/collections/ArrayCollection.as b/frameworks/projects/framework/src/mx/collections/ArrayCollection.as
index ab195b9..6d91c88 100644
--- a/frameworks/projects/framework/src/mx/collections/ArrayCollection.as
+++ b/frameworks/projects/framework/src/mx/collections/ArrayCollection.as
@@ -149,6 +149,7 @@ public class ArrayCollection extends ListCollectionView implements IExternalizab
/**
* Converts an Array Collection to JavaScript Object Notation (JSON) format.
+ * Called by the JSON.stringify() method and should not be called directly.
*
* @langversion 3.0
* @playerversion Flash 11
@@ -157,17 +158,7 @@ public class ArrayCollection extends ListCollectionView implements IExternalizab
*/
public function toJSON(s:String):*
{
- var array:Array = toArray();
-
- if (ApplicationDomain.currentDomain.hasDefinition("JSON"))
- {
- var json:Class = Class(ApplicationDomain.currentDomain.getDefinition("JSON"));
- return json["stringify"](array);
- }
- else
- {
- return '{"error": "Not supported on Flash Player 10"}';
- }
+ return toArray();
}
/**
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/87471644/frameworks/projects/framework/src/mx/collections/ArrayList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/collections/ArrayList.as b/frameworks/projects/framework/src/mx/collections/ArrayList.as
index 42ac624..79545d3 100644
--- a/frameworks/projects/framework/src/mx/collections/ArrayList.as
+++ b/frameworks/projects/framework/src/mx/collections/ArrayList.as
@@ -273,7 +273,8 @@ public class ArrayList extends EventDispatcher
//--------------------------------------------------------------------------
/**
- * Converts an Array Collection to JavaScript Object Notation (JSON) format.
+ * Converts an Array List to JavaScript Object Notation (JSON) format.
+ * Called by the JSON.stringify() method and should not be called directly.
*
* @langversion 3.0
* @playerversion Flash 11
@@ -282,17 +283,7 @@ public class ArrayList extends EventDispatcher
*/
public function toJSON(s:String):*
{
- var array:Array = toArray();
-
- if (ApplicationDomain.currentDomain.hasDefinition("JSON"))
- {
- var json:Class = Class(ApplicationDomain.currentDomain.getDefinition("JSON"));
- return json["stringify"](array);
- }
- else
- {
- return '{"error": "Not supported on Flash Player 10"}';
- }
+ return toArray();
}
/**