44#include " custom_function_bridge.h"
55#include " create_string.h"
66#include " sass_types/factory.h"
7+ #include " debug.h"
78
89Sass_Import_List sass_importer (const char * cur_path, Sass_Importer_Entry cb, struct Sass_Compiler * comp)
910{
@@ -16,6 +17,7 @@ Sass_Import_List sass_importer(const char* cur_path, Sass_Importer_Entry cb, str
1617 argv.push_back ((void *)cur_path);
1718 argv.push_back ((void *)prev_path);
1819
20+ TRACEINST (&bridge) << " Importer will be executed" ;
1921 return bridge (argv);
2022}
2123
@@ -29,6 +31,7 @@ union Sass_Value* sass_custom_function(const union Sass_Value* s_args, Sass_Func
2931 argv.push_back ((void *)sass_list_get_value (s_args, i));
3032 }
3133
34+ TRACEINST (&bridge) << " Function will be executed" ;
3235 return bridge (argv);
3336}
3437
@@ -120,6 +123,7 @@ int ExtractOptions(v8::Local<v8::Object> options, void* cptr, sass_context_wrapp
120123 v8::Local<v8::Function> importer = importer_callback.As <v8::Function>();
121124
122125 CustomImporterBridge *bridge = new CustomImporterBridge (importer, ctx_w->is_sync );
126+ TRACEINST (bridge) << " Importer bridge created" ;
123127 ctx_w->importer_bridges .push_back (bridge);
124128
125129 Sass_Importer_List c_importers = sass_make_importer_list (1 );
@@ -135,6 +139,7 @@ int ExtractOptions(v8::Local<v8::Object> options, void* cptr, sass_context_wrapp
135139 v8::Local<v8::Function> callback = v8::Local<v8::Function>::Cast (Nan::Get (importers, static_cast <uint32_t >(i)).ToLocalChecked ());
136140
137141 CustomImporterBridge *bridge = new CustomImporterBridge (callback, ctx_w->is_sync );
142+ TRACEINST (bridge) << " Importer bridge created (item #" << i << " )" ;
138143 ctx_w->importer_bridges .push_back (bridge);
139144
140145 c_importers[i] = sass_make_importer (sass_importer, importers->Length () - i - 1 , bridge);
@@ -156,6 +161,7 @@ int ExtractOptions(v8::Local<v8::Object> options, void* cptr, sass_context_wrapp
156161 v8::Local<v8::Function> callback = v8::Local<v8::Function>::Cast (Nan::Get (functions, signature).ToLocalChecked ());
157162
158163 CustomFunctionBridge *bridge = new CustomFunctionBridge (callback, ctx_w->is_sync );
164+ TRACEINST (bridge) << " Custom function bridge created (item #" << i << " )" ;
159165 ctx_w->function_bridges .push_back (bridge);
160166
161167 Sass_Function_Entry fn = sass_make_function (create_string (signature), sass_custom_function, bridge);
0 commit comments