Created
July 3, 2019 18:04
-
-
Save hotsphink/1bf26ffd64745fbf1180d726bf7161d0 to your computer and use it in GitHub Desktop.
mkgist-created gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void JSString::traceBase(JSTracer* trc) { | |
| MOZ_ASSERT(hasBase()); | |
| JSString* oldBase = d.s.u3.base; | |
| if (I am a DependentString) { | |
| base = my base | |
| while (my chars do not come from base) | |
| base = base.base | |
| } | |
| TraceManuallyBarrieredEdge(trc, &d.s.u3.base, "base"); | |
| if (oldBase != d.s.u3.base) { | |
| char* oldBaseChars = oldBase->chars; | |
| if (mychars is within oldBaseChars..length) | |
| repoint to d.s.u3.base's chars | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment