0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-22 08:11:52 +00:00

cleanup: remove no longer needed modules_base from ctx, refs #349

This commit is contained in:
Stefan Siegl 2018-02-01 19:43:36 +01:00
parent e8fe553bde
commit 313ad1e258
No known key found for this signature in database
GPG Key ID: 73942AF5642F3DDA
3 changed files with 0 additions and 5 deletions

View File

@ -200,7 +200,6 @@ static void v8js_free_storage(zend_object *object) /* {{{ */
}
c->modules_stack.~vector();
c->modules_base.~vector();
zval_ptr_dtor(&c->zval_snapshot_blob);
@ -226,7 +225,6 @@ static zend_object* v8js_new(zend_class_entry *ce) /* {{{ */
new(&c->array_tmpl) v8::Persistent<v8::FunctionTemplate>();
new(&c->modules_stack) std::vector<char*>();
new(&c->modules_base) std::vector<char*>();
new(&c->modules_loaded) std::map<char *, v8js_persistent_value_t, cmp_str>;
new(&c->template_cache) std::map<const zend_string *,v8js_function_tmpl_t>();

View File

@ -57,7 +57,6 @@ struct v8js_ctx {
zval module_loader;
std::vector<char *> modules_stack;
std::vector<char *> modules_base;
std::map<char *, v8js_persistent_value_t, cmp_str> modules_loaded;
std::map<const zend_string *,v8js_function_tmpl_t> template_cache;

View File

@ -472,7 +472,6 @@ V8JS_METHOD(require)
// Add this module and path to the stack
c->modules_stack.push_back(normalised_module_id);
c->modules_base.push_back(normalised_path);
// Run script to evaluate closure
v8::Local<v8::Value> module_function = script->Run();
@ -501,7 +500,6 @@ V8JS_METHOD(require)
// Remove this module and path from the stack
c->modules_stack.pop_back();
c->modules_base.pop_back();
efree(normalised_path);