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
@@ -30,6 +32,7 @@ union Sass_Value* sass_custom_function(const union Sass_Value* s_args, Sass_Func
3032 }
3133
3234 try {
35+ TRACEINST (&bridge) << " Function will be executed" ;
3336 return bridge (argv);
3437 }
3538 catch (const std::exception& e) {
@@ -125,6 +128,7 @@ int ExtractOptions(v8::Local<v8::Object> options, void* cptr, sass_context_wrapp
125128 v8::Local<v8::Function> importer = importer_callback.As <v8::Function>();
126129
127130 CustomImporterBridge *bridge = new CustomImporterBridge (importer, ctx_w->is_sync );
131+ TRACEINST (bridge) << " Importer bridge created" ;
128132 ctx_w->importer_bridges .push_back (bridge);
129133
130134 Sass_Importer_List c_importers = sass_make_importer_list (1 );
@@ -140,6 +144,7 @@ int ExtractOptions(v8::Local<v8::Object> options, void* cptr, sass_context_wrapp
140144 v8::Local<v8::Function> callback = v8::Local<v8::Function>::Cast (Nan::Get (importers, static_cast <uint32_t >(i)).ToLocalChecked ());
141145
142146 CustomImporterBridge *bridge = new CustomImporterBridge (callback, ctx_w->is_sync );
147+ TRACEINST (bridge) << " Importer bridge created (item #" << i << " )" ;
143148 ctx_w->importer_bridges .push_back (bridge);
144149
145150 c_importers[i] = sass_make_importer (sass_importer, importers->Length () - i - 1 , bridge);
@@ -161,6 +166,7 @@ int ExtractOptions(v8::Local<v8::Object> options, void* cptr, sass_context_wrapp
161166 v8::Local<v8::Function> callback = v8::Local<v8::Function>::Cast (Nan::Get (functions, signature).ToLocalChecked ());
162167
163168 CustomFunctionBridge *bridge = new CustomFunctionBridge (callback, ctx_w->is_sync );
169+ TRACEINST (bridge) << " Custom function bridge created (item #" << i << " )" ;
164170 ctx_w->function_bridges .push_back (bridge);
165171
166172 Sass_Function_Entry fn = sass_make_function (create_string (signature), sass_custom_function, bridge);
0 commit comments