Bug 1289050 - Part 8.6: Convert SavedFrame::checkThis to file static function. r=jwalden
authorTooru Fujisawa <arai_a@mac.com>
Fri, 30 Sep 2016 12:34:49 +0900
changeset 315963 14ef4a8f55f36318d169db10c638726928fd59e0
parent 315962 44ddce7c9b96316464b66b90a2f4d98fb763f52f
child 315964 b1428a6cabc5c470e505841d2306e5ca4c3576f7
push id20634
push usercbook@mozilla.com
push dateFri, 30 Sep 2016 10:10:13 +0000
treeherderfx-team@afe79b010d13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalden
bugs1289050
milestone52.0a1
Bug 1289050 - Part 8.6: Convert SavedFrame::checkThis to file static function. r=jwalden
js/src/vm/SavedFrame.h
js/src/vm/SavedStacks.cpp
--- a/js/src/vm/SavedFrame.h
+++ b/js/src/vm/SavedFrame.h
@@ -177,19 +177,16 @@ class SavedFrame : public NativeObject {
         JSSLOT_FUNCTIONDISPLAYNAME,
         JSSLOT_ASYNCCAUSE,
         JSSLOT_PARENT,
         JSSLOT_PRINCIPALS,
 
         // The total number of reserved slots in the SavedFrame class.
         JSSLOT_COUNT
     };
-
-    static MOZ_MUST_USE bool checkThis(JSContext* cx, CallArgs& args, const char* fnName,
-                                       MutableHandleObject frame);
 };
 
 struct SavedFrame::HashPolicy
 {
     typedef SavedFrame::Lookup              Lookup;
     typedef MovableCellHasher<SavedFrame*>  SavedFramePtrHasher;
     typedef PointerHasher<JSPrincipals*, 3> JSPrincipalsPtrHasher;
 
--- a/js/src/vm/SavedStacks.cpp
+++ b/js/src/vm/SavedStacks.cpp
@@ -596,19 +596,19 @@ GetFirstSubsumedSavedFrame(JSContext* cx
 {
     if (!savedFrame)
         return nullptr;
     bool skippedAsync;
     RootedSavedFrame frame(cx, &savedFrame->as<SavedFrame>());
     return GetFirstSubsumedFrame(cx, frame, selfHosted, skippedAsync);
 }
 
-/* static */ bool
-SavedFrame::checkThis(JSContext* cx, CallArgs& args, const char* fnName,
-                      MutableHandleObject frame)
+static MOZ_MUST_USE bool
+SavedFrame_checkThis(JSContext* cx, CallArgs& args, const char* fnName,
+                     MutableHandleObject frame)
 {
     const Value& thisValue = args.thisv();
 
     if (!thisValue.isObject()) {
         JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_NOT_NONNULL_OBJECT,
                                   InformalValueTypeName(thisValue));
         return false;
     }
@@ -646,17 +646,17 @@ SavedFrame::checkThis(JSContext* cx, Cal
 //   - Value*     vp
 //   - const char* fnName
 // These parameters will be defined after calling this macro:
 //   - CallArgs args
 //   - Rooted<SavedFrame*> frame (will be non-null)
 #define THIS_SAVEDFRAME(cx, argc, vp, fnName, args, frame)             \
     CallArgs args = CallArgsFromVp(argc, vp);                          \
     RootedObject frame(cx);                                            \
-    if (!checkThis(cx, args, fnName, &frame))                          \
+    if (!SavedFrame_checkThis(cx, args, fnName, &frame))               \
         return false;
 
 } /* namespace js */
 
 namespace JS {
 
 namespace {