Skip to content

Commit

Permalink
Add method to both get and set external array data.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregory Brail committed Apr 13, 2015
1 parent 06710fa commit 52b8881
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/org/mozilla/javascript/ScriptableObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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.
*/
Expand Down

0 comments on commit 52b8881

Please sign in to comment.