Closed Bug 468580 Opened 16 years ago Closed 16 years ago

Refactor NativeString & RegExpProxy to have all regexp related stuff in RegExpProxy

Categories

(Rhino Graveyard :: Core, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mguillemot, Assigned: norrisboyd)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/2008111317 Ubuntu/8.04 (hardy) Firefox/3.0.4 Build Identifier: Most of the Regexp related code is hidden behind RegExpProxy and therefore allows to easily provide an other implementation of RegExp... except for String.split. Therefore String.split should delegate to the RegExpProxy as well. This is a blocker for bug #390659 Reproducible: Always Steps to Reproduce: 1. 2. 3.
This patch moves NativeString's js_split & find_split to RegExpImpl and adds method js_split to interface RegExpProxy. It doesn't search to simplify anything to make patch review easier (for instance find_split should surely be removed from interface RegExpProxy). It modifies the API of the public interface RegExpProxy but: - this interface doesn't belong to the public API for which a JavaDoc is generated and therefore can be seen as "internal" - I wouldn't be surprised if except HtmlUnit, nobody uses this mechanism to use an alternive RegExp implementation - finally, it will make possible to provide a new regexp support based on Java RegExp and to give the possibility to choose between the two implementations
Looks good, thanks. Checking in src/org/mozilla/javascript/NativeString.java; /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/NativeString.java,v <-- NativeString.java new revision: 1.63; previous revision: 1.62 done Checking in src/org/mozilla/javascript/RegExpProxy.java; /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/RegExpProxy.java,v <-- RegExpProxy.java new revision: 1.20; previous revision: 1.19 done Checking in src/org/mozilla/javascript/regexp/RegExpImpl.java; /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/regexp/RegExpImpl.java,v <-- RegExpImpl.java new revision: 1.37; previous revision: 1.36 done
Assignee: nobody → norrisboyd
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: