This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Do not use C++ exceptions in the binding code #1133
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
::construct() methods may return NULL and indicate an error in the returned error 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).
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 I believe we're making steps in this direction in 3.3 - sass/libsass#1544 |
We don't use |
943 passing (21s) 💯 |
Can you show me your full compiler flags now? |
Yep I just meant we agree with the sentiment and we're working on it. Would be worth opening a LibSass issue to track for 3.4. |
👍 Ship it when you're comfortable @saper |
This was referenced Sep 10, 2015
This was referenced Oct 16, 2015
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We are running into trouble with C++ runtime
libraries (notably by mixing libstdc++ and libc++
on MacOSX). Reduce the risk by adhering to Google
Style Guide and stop using C++ exceptions at all.
libsass should offer us a pure C interface
and promises to not throw any exceptions as well.
While here, add additional checks for list and
map values.
Fixes: #1131
Closes: #1127