mozilla / spidernode

Node.js on top of SpiderMonkey
https://ehsanakhgari.org/blog/2016-04-20/project-spidernode
Other
561 stars 42 forks source link

Sync SpiderMonkey from Mozilla upstream #352

Closed mykmelez closed 7 years ago

mykmelez commented 7 years ago

Here's the latest sync from upstream SpiderMonkey. This branch doesn't yet compile because of errors like these:

In file included from ../deps/spidershim/src/v8isolate.cc:35:
In file included from ../deps/spidershim/src/v8isolate.h:28:
In file included from ../deps/spidershim/src/rootstore.h:28:
../deps/spidershim/src/gclist.h:71:7: error: too few template arguments for class template 'RootedBase'
class RootedBase<v8::internal::GCList<T>>
      ^
/Users/myk/Projects/spidernode/out/Release/spidermonkey/dist/include/js/RootingAPI.h:123:7: note: template is declared here
class RootedBase : public MutableWrappedPtrOperations<T, Wrapper> {};
      ^
In file included from ../deps/spidershim/src/v8isolate.cc:35:
In file included from ../deps/spidershim/src/v8isolate.h:28:
In file included from ../deps/spidershim/src/rootstore.h:28:
../deps/spidershim/src/gclist.h:76:7: error: too few template arguments for class template 'PersistentRootedBase'
class PersistentRootedBase<v8::internal::GCList<T>>
      ^
/Users/myk/Projects/spidernode/out/Release/spidermonkey/dist/include/js/RootingAPI.h:143:7: note: template is declared here
class PersistentRootedBase : public MutableWrappedPtrOperations<T, Wrapper> {};
      ^

The rooting base class templates were refactored in https://hg.mozilla.org/mozilla-central/rev/2e1a0c4886c5 per https://bugzilla.mozilla.org/show_bug.cgi?id=1325406, although I don't have access to that bug, so I can only see what happened, not why.

mykmelez commented 7 years ago

Ok, I've updated the RootedBase template in gclist.h to resolve the build failures. I don't understand the rooting code very well, neither before nor after its recent refactoring. Nevertheless, I think the updated RootedBase template is the correct implementation, given the upstream changes. It also builds and tests successfully locally. Let's see what Travis says.

mykmelez commented 7 years ago

@tbsaunde Tests all passed with my RootedBase updates. I'll go ahead and merge this (in preparation for the next sync from upstream).