MozReview-Commit-ID: JGQ9qyi5pRc
This commit is contained in:
Phil Ringnalda 2016-12-27 20:33:25 -08:00
Родитель d376a758dc 3ed240d6b8
Коммит 94ed5056b1
9 изменённых файлов: 78 добавлений и 67 удалений

Просмотреть файл

@ -655,7 +655,7 @@ skip-if = (toolkit == 'android') # Android: Bug 775227
[test_innersize_scrollport.html]
[test_integer_attr_with_leading_zero.html]
[test_intersectionobservers.html]
skip-if = true # Track Bug 1320704
skip-if = (os == "android") # Timing issues
[test_link_prefetch.html]
skip-if = !e10s # Track Bug 1281415
[test_link_stylesheet.html]

Просмотреть файл

@ -619,9 +619,9 @@ var interfaceNamesInGlobalScope =
// IMPORTANT: Do not change this list without review from a DOM peer!
"InstallTrigger",
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "IntersectionObserver", disabled: true},
"IntersectionObserver",
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "IntersectionObserverEntry", disabled: true},
"IntersectionObserverEntry",
// IMPORTANT: Do not change this list without review from a DOM peer!
"KeyEvent",
// IMPORTANT: Do not change this list without review from a DOM peer!

Просмотреть файл

@ -414,7 +414,7 @@ public:
* CONSTRUCTION PHASE ONLY
* Create a BorderLayer for this manager's layer tree.
*/
virtual already_AddRefed<BorderLayer> CreateBorderLayer() { return nullptr; }
virtual already_AddRefed<BorderLayer> CreateBorderLayer() = 0;
/**
* CONSTRUCTION PHASE ONLY
* Create a CanvasLayer for this manager's layer tree.

Просмотреть файл

@ -82,6 +82,10 @@ public:
NS_RUNTIMEABORT("Not implemented.");
return nullptr;
}
virtual already_AddRefed<BorderLayer> CreateBorderLayer() {
NS_RUNTIMEABORT("Not implemented.");
return nullptr;
}
virtual void SetRoot(Layer* aLayer) {}
virtual bool BeginTransactionWithTarget(gfxContext* aTarget) { return true; }
virtual already_AddRefed<CanvasLayer> CreateCanvasLayer() {

Просмотреть файл

@ -45,7 +45,6 @@ namespace JS { class Value; }
# define JS_ENUM_FOOTER(id) __attribute__((packed))
#endif
/* Remember to propagate changes to the C defines below. */
JS_ENUM_HEADER(JSValueType, uint8_t)
{
JSVAL_TYPE_DOUBLE = 0x00,
@ -69,19 +68,18 @@ static_assert(sizeof(JSValueType) == 1,
#if defined(JS_NUNBOX32)
/* Remember to propagate changes to the C defines below. */
JS_ENUM_HEADER(JSValueTag, uint32_t)
{
JSVAL_TAG_CLEAR = 0xFFFFFF80,
JSVAL_TAG_INT32 = JSVAL_TAG_CLEAR | JSVAL_TYPE_INT32,
JSVAL_TAG_UNDEFINED = JSVAL_TAG_CLEAR | JSVAL_TYPE_UNDEFINED,
JSVAL_TAG_NULL = JSVAL_TAG_CLEAR | JSVAL_TYPE_NULL,
JSVAL_TAG_STRING = JSVAL_TAG_CLEAR | JSVAL_TYPE_STRING,
JSVAL_TAG_SYMBOL = JSVAL_TAG_CLEAR | JSVAL_TYPE_SYMBOL,
JSVAL_TAG_BOOLEAN = JSVAL_TAG_CLEAR | JSVAL_TYPE_BOOLEAN,
JSVAL_TAG_MAGIC = JSVAL_TAG_CLEAR | JSVAL_TYPE_MAGIC,
JSVAL_TAG_OBJECT = JSVAL_TAG_CLEAR | JSVAL_TYPE_OBJECT,
JSVAL_TAG_PRIVATE_GCTHING = JSVAL_TAG_CLEAR | JSVAL_TYPE_PRIVATE_GCTHING
JSVAL_TAG_STRING = JSVAL_TAG_CLEAR | JSVAL_TYPE_STRING,
JSVAL_TAG_SYMBOL = JSVAL_TAG_CLEAR | JSVAL_TYPE_SYMBOL,
JSVAL_TAG_PRIVATE_GCTHING = JSVAL_TAG_CLEAR | JSVAL_TYPE_PRIVATE_GCTHING,
JSVAL_TAG_OBJECT = JSVAL_TAG_CLEAR | JSVAL_TYPE_OBJECT
} JS_ENUM_FOOTER(JSValueTag);
static_assert(sizeof(JSValueTag) == sizeof(uint32_t),
@ -89,19 +87,18 @@ static_assert(sizeof(JSValueTag) == sizeof(uint32_t),
#elif defined(JS_PUNBOX64)
/* Remember to propagate changes to the C defines below. */
JS_ENUM_HEADER(JSValueTag, uint32_t)
{
JSVAL_TAG_MAX_DOUBLE = 0x1FFF0,
JSVAL_TAG_INT32 = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_INT32,
JSVAL_TAG_UNDEFINED = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_UNDEFINED,
JSVAL_TAG_NULL = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_NULL,
JSVAL_TAG_STRING = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_STRING,
JSVAL_TAG_SYMBOL = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_SYMBOL,
JSVAL_TAG_BOOLEAN = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_BOOLEAN,
JSVAL_TAG_MAGIC = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_MAGIC,
JSVAL_TAG_OBJECT = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_OBJECT,
JSVAL_TAG_PRIVATE_GCTHING = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_PRIVATE_GCTHING
JSVAL_TAG_STRING = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_STRING,
JSVAL_TAG_SYMBOL = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_SYMBOL,
JSVAL_TAG_PRIVATE_GCTHING = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_PRIVATE_GCTHING,
JSVAL_TAG_OBJECT = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_OBJECT
} JS_ENUM_FOOTER(JSValueTag);
static_assert(sizeof(JSValueTag) == sizeof(uint32_t),
@ -113,12 +110,12 @@ JS_ENUM_HEADER(JSValueShiftedTag, uint64_t)
JSVAL_SHIFTED_TAG_INT32 = (((uint64_t)JSVAL_TAG_INT32) << JSVAL_TAG_SHIFT),
JSVAL_SHIFTED_TAG_UNDEFINED = (((uint64_t)JSVAL_TAG_UNDEFINED) << JSVAL_TAG_SHIFT),
JSVAL_SHIFTED_TAG_NULL = (((uint64_t)JSVAL_TAG_NULL) << JSVAL_TAG_SHIFT),
JSVAL_SHIFTED_TAG_STRING = (((uint64_t)JSVAL_TAG_STRING) << JSVAL_TAG_SHIFT),
JSVAL_SHIFTED_TAG_SYMBOL = (((uint64_t)JSVAL_TAG_SYMBOL) << JSVAL_TAG_SHIFT),
JSVAL_SHIFTED_TAG_BOOLEAN = (((uint64_t)JSVAL_TAG_BOOLEAN) << JSVAL_TAG_SHIFT),
JSVAL_SHIFTED_TAG_MAGIC = (((uint64_t)JSVAL_TAG_MAGIC) << JSVAL_TAG_SHIFT),
JSVAL_SHIFTED_TAG_OBJECT = (((uint64_t)JSVAL_TAG_OBJECT) << JSVAL_TAG_SHIFT),
JSVAL_SHIFTED_TAG_PRIVATE_GCTHING = (((uint64_t)JSVAL_TAG_PRIVATE_GCTHING) << JSVAL_TAG_SHIFT)
JSVAL_SHIFTED_TAG_STRING = (((uint64_t)JSVAL_TAG_STRING) << JSVAL_TAG_SHIFT),
JSVAL_SHIFTED_TAG_SYMBOL = (((uint64_t)JSVAL_TAG_SYMBOL) << JSVAL_TAG_SHIFT),
JSVAL_SHIFTED_TAG_PRIVATE_GCTHING = (((uint64_t)JSVAL_TAG_PRIVATE_GCTHING) << JSVAL_TAG_SHIFT),
JSVAL_SHIFTED_TAG_OBJECT = (((uint64_t)JSVAL_TAG_OBJECT) << JSVAL_TAG_SHIFT)
} JS_ENUM_FOOTER(JSValueShiftedTag);
static_assert(sizeof(JSValueShiftedTag) == sizeof(uint64_t),

Просмотреть файл

@ -860,9 +860,7 @@ EnumerableOwnProperties(JSContext* cx, const JS::CallArgs& args, EnumerableOwnPr
// (Omitted because Object.keys doesn't use this implementation.)
// Step 4.a.ii.2.a.
if (obj->isNative() && desc.hasValue())
value = desc.value();
else if (!GetProperty(cx, obj, obj, id, &value))
if (!GetProperty(cx, obj, obj, id, &value))
return false;
}

Просмотреть файл

@ -778,52 +778,64 @@ DrainJobQueue(JSContext* cx)
if (sc->quitting || sc->drainingJobQueue)
return true;
// Wait for any outstanding async tasks to finish so that the
// finishedAsyncTasks list is fixed.
while (true) {
AutoLockHelperThreadState lock;
if (!sc->asyncTasks.lock()->outstanding)
break;
HelperThreadState().wait(lock, GlobalHelperThreadState::CONSUMER);
}
// Lock the whole time while copying back the asyncTasks finished queue so
// that any new tasks created during finish() cannot racily join the job
// queue. Call finish() only thereafter, to avoid a circular mutex
// dependency (see also bug 1297901).
Vector<JS::AsyncTask*> finished(cx);
{
ExclusiveData<ShellAsyncTasks>::Guard asyncTasks = sc->asyncTasks.lock();
finished = Move(asyncTasks->finished);
asyncTasks->finished.clear();
}
for (JS::AsyncTask* task : finished)
task->finish(cx);
// It doesn't make sense for job queue draining to be reentrant. At the
// same time we don't want to assert against it, because that'd make
// drainJobQueue unsafe for fuzzers. We do want fuzzers to test this, so
// we simply ignore nested calls of drainJobQueue.
sc->drainingJobQueue = true;
RootedObject job(cx);
JS::HandleValueArray args(JS::HandleValueArray::empty());
RootedValue rval(cx);
// Execute jobs in a loop until we've reached the end of the queue.
// Since executing a job can trigger enqueuing of additional jobs,
// it's crucial to re-check the queue length during each iteration.
for (size_t i = 0; i < sc->jobQueue.length(); i++) {
job = sc->jobQueue[i];
AutoCompartment ac(cx, job);
{
AutoReportException are(cx);
JS::Call(cx, UndefinedHandleValue, job, args, &rval);
// Wait for any outstanding async tasks to finish so that the
// finishedAsyncTasks list is fixed.
while (true) {
AutoLockHelperThreadState lock;
if (!sc->asyncTasks.lock()->outstanding)
break;
HelperThreadState().wait(lock, GlobalHelperThreadState::CONSUMER);
}
// Lock the whole time while copying back the asyncTasks finished queue
// so that any new tasks created during finish() cannot racily join the
// job queue. Call finish() only thereafter, to avoid a circular mutex
// dependency (see also bug 1297901).
Vector<JS::AsyncTask*> finished(cx);
{
ExclusiveData<ShellAsyncTasks>::Guard asyncTasks = sc->asyncTasks.lock();
finished = Move(asyncTasks->finished);
asyncTasks->finished.clear();
}
for (JS::AsyncTask* task : finished)
task->finish(cx);
// It doesn't make sense for job queue draining to be reentrant. At the
// same time we don't want to assert against it, because that'd make
// drainJobQueue unsafe for fuzzers. We do want fuzzers to test this,
// so we simply ignore nested calls of drainJobQueue.
sc->drainingJobQueue = true;
RootedObject job(cx);
JS::HandleValueArray args(JS::HandleValueArray::empty());
RootedValue rval(cx);
// Execute jobs in a loop until we've reached the end of the queue.
// Since executing a job can trigger enqueuing of additional jobs,
// it's crucial to re-check the queue length during each iteration.
for (size_t i = 0; i < sc->jobQueue.length(); i++) {
job = sc->jobQueue[i];
AutoCompartment ac(cx, job);
{
AutoReportException are(cx);
JS::Call(cx, UndefinedHandleValue, job, args, &rval);
}
sc->jobQueue[i].set(nullptr);
}
sc->jobQueue.clear();
sc->drainingJobQueue = false;
// It's possible a job added an async task, and it's also possible
// that task has already finished.
{
ExclusiveData<ShellAsyncTasks>::Guard asyncTasks = sc->asyncTasks.lock();
if (asyncTasks->outstanding == 0 && asyncTasks->finished.length() == 0)
break;
}
sc->jobQueue[i].set(nullptr);
}
sc->jobQueue.clear();
sc->drainingJobQueue = false;
return true;
}

Просмотреть файл

@ -4179,7 +4179,7 @@ nsDisplayBorder::GetLayerState(nsDisplayListBuilder* aBuilder,
}
mRect = ViewAs<LayerPixel>(br->mOuterRect);
return LAYER_INACTIVE;
return LAYER_ACTIVE;
}
already_AddRefed<Layer>

Просмотреть файл

@ -5566,4 +5566,4 @@ pref("prompts.authentication_dialog_abuse_limit", 3);
// To enable the DOM implementation, turn on "dom.storageManager.enabled"
pref("browser.storageManager.enabled", false);
pref("dom.IntersectionObserver.enabled", false);
pref("dom.IntersectionObserver.enabled", true);