Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sass
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
楚学文
node-sass
Commits
a5067a64
Commit
a5067a64
authored
Dec 26, 2014
by
Adeel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code: Caches result as soon as v8 returns.
Not fixes segfault bug, but brings clarity of intent.
parent
df228056
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
index.js
lib/index.js
+9
-7
No files found.
lib/index.js
View file @
a5067a64
...
...
@@ -161,12 +161,13 @@ function getOptions(options) {
};
options
.
success
=
function
()
{
var
stats
=
endStats
(
options
.
result
.
stats
);
var
result
=
options
.
result
;
var
stats
=
endStats
(
result
.
stats
);
if
(
success
)
{
success
({
css
:
options
.
result
.
css
,
map
:
options
.
result
.
sourceMap
,
css
:
result
.
css
,
map
:
result
.
sourceMap
,
stats
:
stats
});
}
...
...
@@ -231,12 +232,13 @@ module.exports.render = function(options) {
module
.
exports
.
renderSync
=
function
(
options
)
{
options
=
getOptions
(
options
);
var
result
=
options
.
data
?
binding
.
renderSync
(
options
)
:
binding
.
renderFileSync
(
options
);
var
status
=
options
.
data
?
binding
.
renderSync
(
options
)
:
binding
.
renderFileSync
(
options
);
var
result
=
options
.
result
;
if
(
result
)
{
options
.
result
.
stats
=
endStats
(
options
.
result
.
stats
);
if
(
status
)
{
result
.
stats
=
endStats
(
result
.
stats
);
return
options
.
result
;
return
result
;
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment