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

Do not use C++ exceptions in the binding code #1133

Merged
merged 4 commits into from
Sep 10, 2015
Merged

Commits on Sep 8, 2015

  1. Introduce SassValueWrapper::fail()

    This method uses Sass error value
    as a vehicle to report the error message,
    but returns NULL to indicate constructor
    failure.
    
    This is used to tell successful creation
    of the Sass error object from the constructor
    failure, where no valid Sass object can be
    created.
    saper committed Sep 8, 2015
    Configuration menu
    Copy the full SHA
    4a6a9cc View commit details
    Browse the repository at this point in the history
  2. Return NULL when failed to construct a Sass value

    ::construct() methods may return NULL and
    indicate an error in the returned error value.
    saper committed Sep 8, 2015
    Configuration menu
    Copy the full SHA
    dd1f3a9 View commit details
    Browse the repository at this point in the history
  3. Throw V8 exception on invalid Sass_Value

    In the unlikely event libsass gives us the
    value we don't understand use V8 exception
    to report failure and exit before calling
    a user-defined custom function.
    
    XXX We do not have currently any way
        to test this (that would require mocking
        libsass).
    saper committed Sep 8, 2015
    Configuration menu
    Copy the full SHA
    f6ebeab View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2015

  1. Return NULL if the Object cannot be unwrapped

    Fix crash in List::SetValue() etc. when trying
    to add a bare JavaScript object.
    
    Check for bare objects in lists and maps in test.
    
    Don't use C++ exceptions in the binding code.
    saper committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    228b39d View commit details
    Browse the repository at this point in the history