mozilla / spidernode

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

merge upstream node revision 3fffebbde3221323d45f72a22a936120fe43de58 #360

Closed mykmelez closed 7 years ago

mykmelez commented 7 years ago

The weekly merge from upstream Node. My local build fails with these errors in node_contextify.cc:

../src/node_contextify.cc:36:11: error: no member named 'PropertyDescriptor' in namespace 'v8'
using v8::PropertyDescriptor;
      ~~~~^
../src/node_contextify.cc:144:48: error: unknown type name 'PropertyDescriptor'
        auto define_property_on_sandbox = [&] (PropertyDescriptor* desc) {
                                               ^
../src/node_contextify.cc:151:26: error: no member named 'DefineProperty' in 'v8::Object'; did you mean 'DefineOwnProperty'?
            sandbox_obj->DefineProperty(context, key, *desc);
                         ^~~~~~~~~~~~~~
                         DefineOwnProperty
../deps/spidershim/include/v8.h:1560:37: note: 'DefineOwnProperty' declared here
  V8_WARN_UNUSED_RESULT Maybe<bool> DefineOwnProperty(
                                    ^
../src/node_contextify.cc:162:11: error: unknown type name 'PropertyDescriptor'
          PropertyDescriptor desc(get, set);
          ^
../src/node_contextify.cc:173:11: error: unknown type name 'PropertyDescriptor'
          PropertyDescriptor desc(value, writable);
          ^

It looks like https://github.com/nodejs/node/commit/67af1ad671d8d8a1dd6358339436f8b9718fc3d9 is the upstream change that broke the build. Presumably we need to shim v8::PropertyDescriptor and v8::Object::DefineProperty.

mykmelez commented 7 years ago

Presumably we need to shim v8::PropertyDescriptor and v8::Object::DefineProperty.

Commit b10b241 does this.