Bug 1384625 - Crash in ServoComputedValues::GetStyleVariables, which should never need to be called. r=emilio
authorCameron McCormack <cam@mcc.id.au>
Thu, 27 Jul 2017 17:33:29 +0800
changeset 420250 847e0a72b2766a90ced8727574c27f596ca29872
parent 420249 e264858a00d481b5afa785753f29efcaaeca6228
child 420251 9bba40accbf61384715d963df18e05227676591f
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1384625
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1384625 - Crash in ServoComputedValues::GetStyleVariables, which should never need to be called. r=emilio MozReview-Commit-ID: 4HYNGMPMhsH
layout/style/ServoBindingList.h
layout/style/ServoBindings.cpp
--- a/layout/style/ServoBindingList.h
+++ b/layout/style/ServoBindingList.h
@@ -576,17 +576,15 @@ SERVO_BINDING_FUNC(Servo_GetCustomProper
 
 SERVO_BINDING_FUNC(Servo_GetCustomPropertiesCount, uint32_t,
                    ServoStyleContextBorrowed computed_values)
 
 SERVO_BINDING_FUNC(Servo_GetCustomPropertyNameAt, bool,
                    ServoStyleContextBorrowed, uint32_t index,
                    nsAString* name)
 
-SERVO_BINDING_FUNC(Servo_GetEmptyVariables, const nsStyleVariables*)
-
 
 // AddRef / Release functions
 #define SERVO_ARC_TYPE(name_, type_)                                \
   SERVO_BINDING_FUNC(Servo_##name_##_AddRef, void, type_##Borrowed) \
   SERVO_BINDING_FUNC(Servo_##name_##_Release, void, type_##Borrowed)
 #include "mozilla/ServoArcTypeList.h"
 #undef SERVO_ARC_TYPE
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -232,17 +232,18 @@ ServoComputedData::ServoComputedData(
     const ServoComputedDataForgotten aValue)
 {
   PodAssign(this, aValue.mPtr);
 }
 
 const nsStyleVariables*
 ServoComputedData::GetStyleVariables() const
 {
-  return Servo_GetEmptyVariables();
+  MOZ_CRASH("ServoComputedData::GetStyleVariables should never need to be "
+            "called");
 }
 
 void
 Gecko_ServoStyleContext_Destroy(ServoStyleContext* aContext)
 {
   aContext->~ServoStyleContext();
 }