summaryrefslogtreecommitdiffstats
path: root/js/src/vm/ErrorObject.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-06-08 23:29:58 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:26 -0400
commitcaf39feeeb457ffb143110826a0220211c00afb6 (patch)
tree3734dd19f40a0450c4dca46e8dd8de01ff1955d0 /js/src/vm/ErrorObject.cpp
parent3a5176f4b25a2b90cefe14eb2c2de57113dc21ac (diff)
downloadUXP-caf39feeeb457ffb143110826a0220211c00afb6.tar
UXP-caf39feeeb457ffb143110826a0220211c00afb6.tar.gz
UXP-caf39feeeb457ffb143110826a0220211c00afb6.tar.lz
UXP-caf39feeeb457ffb143110826a0220211c00afb6.tar.xz
UXP-caf39feeeb457ffb143110826a0220211c00afb6.zip
1320408 - Part 15: Change NativeObject::addDataProperty to static method.
Diffstat (limited to 'js/src/vm/ErrorObject.cpp')
-rw-r--r--js/src/vm/ErrorObject.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/src/vm/ErrorObject.cpp b/js/src/vm/ErrorObject.cpp
index d8d29830b..271132801 100644
--- a/js/src/vm/ErrorObject.cpp
+++ b/js/src/vm/ErrorObject.cpp
@@ -29,11 +29,11 @@ js::ErrorObject::assignInitialShape(ExclusiveContext* cx, Handle<ErrorObject*> o
{
MOZ_ASSERT(obj->empty());
- if (!obj->addDataProperty(cx, cx->names().fileName, FILENAME_SLOT, 0))
+ if (!NativeObject::addDataProperty(cx, obj, cx->names().fileName, FILENAME_SLOT, 0))
return nullptr;
- if (!obj->addDataProperty(cx, cx->names().lineNumber, LINENUMBER_SLOT, 0))
+ if (!NativeObject::addDataProperty(cx, obj, cx->names().lineNumber, LINENUMBER_SLOT, 0))
return nullptr;
- return obj->addDataProperty(cx, cx->names().columnNumber, COLUMNNUMBER_SLOT, 0);
+ return NativeObject::addDataProperty(cx, obj, cx->names().columnNumber, COLUMNNUMBER_SLOT, 0);
}
/* static */ bool
@@ -57,7 +57,7 @@ js::ErrorObject::init(JSContext* cx, Handle<ErrorObject*> obj, JSExnType type,
// |new Error()|.
RootedShape messageShape(cx);
if (message) {
- messageShape = obj->addDataProperty(cx, cx->names().message, MESSAGE_SLOT, 0);
+ messageShape = NativeObject::addDataProperty(cx, obj, cx->names().message, MESSAGE_SLOT, 0);
if (!messageShape)
return false;
MOZ_ASSERT(messageShape->slot() == MESSAGE_SLOT);