Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Custom function returning sass.types.List(1) containg bare JS Object causes a crash #1131

Closed
saper opened this issue Sep 8, 2015 · 1 comment

Comments

@saper
Copy link
Member

saper commented Sep 8, 2015

To reproduce:

var sass = require('node-sass');
      sass.render({
        data: 'div { color: foo(); }',
        functions: {
          'foo()': function() {
            var out = new sass.types.List(1);
            out.setValue(0, new Object());
            return new out;
          }
        }
      }, function(error) {
        console.log(error);
        done();
      });

Backtrace:

#4  0x0000000802dbe761 in SassTypes::Factory::unwrap (obj=...) at ../src/sass_types/factory.cpp:68
#5  0x0000000802dc0ff5 in SassTypes::List::SetValue (info=...) at ../src/sass_types/list.cpp:73
#6  0x0000000802dac93c in Nan::imp::FunctionCallbackWrapper (info=...) at ../node_modules/nan/nan_callbacks_12_inl.h:174
#7  0x00000000007f7f45 in v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&))
    ()

Fix on the way!

@saper
Copy link
Member Author

saper commented Sep 10, 2015

Closed via #1133

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants