зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset c133d3c084c0: now we want to measure if not doing sync stuff on background thread reduces crashes.
This commit is contained in:
Родитель
84d7826ab9
Коммит
bbab689d64
|
@ -104,18 +104,6 @@ js_GetStringChars(JSContext *cx, JSString *str)
|
||||||
void
|
void
|
||||||
JSString::flatten()
|
JSString::flatten()
|
||||||
{
|
{
|
||||||
// Diagnostic: serialize all calls to this function to see
|
|
||||||
// if concurrent calls are crashing us.
|
|
||||||
JS_LOCK_RUNTIME(asCell()->compartment()->rt);
|
|
||||||
// The main body of this function can be executed only if
|
|
||||||
// the string is a rope. With multiple threads, it's possible
|
|
||||||
// we waited while another one ran, and the string has
|
|
||||||
// already been flattened for us.
|
|
||||||
if (!isRope()) {
|
|
||||||
JS_UNLOCK_RUNTIME(asCell()->compartment()->rt);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
JSString *topNode;
|
JSString *topNode;
|
||||||
jschar *chars;
|
jschar *chars;
|
||||||
size_t capacity;
|
size_t capacity;
|
||||||
|
@ -193,8 +181,6 @@ JSString::flatten()
|
||||||
/* Set null terminator. */
|
/* Set null terminator. */
|
||||||
chars[pos] = 0;
|
chars[pos] = 0;
|
||||||
topNode->initFlatMutable(chars, pos, capacity);
|
topNode->initFlatMutable(chars, pos, capacity);
|
||||||
|
|
||||||
JS_UNLOCK_RUNTIME(asCell()->compartment()->rt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef JS_TRACER
|
#ifdef JS_TRACER
|
||||||
|
|
Загрузка…
Ссылка в новой задаче