From 52b88817157efaebf226006cc4ad3af499b79a19 Mon Sep 17 00:00:00 2001 From: Gregory Brail Date: Mon, 13 Apr 2015 13:32:13 -0700 Subject: [PATCH] Add method to both get and set external array data. --- src/org/mozilla/javascript/ScriptableObject.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/org/mozilla/javascript/ScriptableObject.java b/src/org/mozilla/javascript/ScriptableObject.java index fa45e4ad04..56962951f0 100644 --- a/src/org/mozilla/javascript/ScriptableObject.java +++ b/src/org/mozilla/javascript/ScriptableObject.java @@ -864,7 +864,7 @@ void addLazilyInitializedValue(String name, int index, * * @param array the List to use for delegated property access. Set this to null to revert back to regular * property access. - * @since 1.8.0 + * @since 1.7.6 */ public void setExternalArrayData(ExternalArrayData array) { @@ -879,6 +879,17 @@ public void setExternalArrayData(ExternalArrayData array) } } + /** + * Return the array that was previously set by the call to "setExternalArrayData". + * + * @return the array, or null if it was never set + * @since 1.7.6 + */ + public ExternalArrayData getExternalArrayData() + { + return externalData; + } + /** * This is a function used by setExternalArrayData to dynamically get the "length" property value. */