| java.lang.Object com.gargoylesoftware.htmlunit.javascript.StringPrimitivePrototypeBugFixer
StringPrimitivePrototypeBugFixer | public class StringPrimitivePrototypeBugFixer implements Scriptable(Code) | | Implements a workaround for Rhino bug https://bugzilla.mozilla.org/show_bug.cgi?id=374918.
Once this bug is solved, this class can be safely removed. Unit tests will ensure that this works
correctly.
Bug Description:
string primitive prototype is badly resolved when many top scopes are involved.
Workaround:
a custom prototype is placed on the String object. It wraps the original one and fix bad scope resolution
when needed. For this purpose it needs to change the visibility of some Rhino private members to
access them and is likely to get broken on Rhino version updates.
version: $Revision: 2132 $ author: Marc Guillemot |
StringPrimitivePrototypeBugFixer | StringPrimitivePrototypeBugFixer(Scriptable wrapped)(Code) | | |
delete | public void delete(int index)(Code) | | |
getParentScope | public Scriptable getParentScope()(Code) | | |
getPrototype | public Scriptable getPrototype()(Code) | | |
has | public boolean has(int index, Scriptable start)(Code) | | |
hasInstance | public boolean hasInstance(Scriptable instance)(Code) | | |
installWorkaround | static void installWorkaround(Scriptable topScope) throws Exception(Code) | | Install the workaround for the Rhino bug
Parameters: topScope - the top scope (which contains the standard objects) throws: Exception - if initialization fails |
put | public void put(int index, Scriptable start, Object value)(Code) | | |
setParentScope | public void setParentScope(Scriptable parent)(Code) | | |
setPrototype | public void setPrototype(Scriptable prototype)(Code) | | |
|
|