Skip to content

Commit

Permalink
always flush
Browse files Browse the repository at this point in the history
  • Loading branch information
krakjoe committed Feb 11, 2019
1 parent 5d80d5e commit a41f9db
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions php_inspector.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ static void php_inspector_execute(zend_execute_data *execute_data) {

if (UNEXPECTED(map)) {
if (UNEXPECTED(!function->function_name)) {

php_inspector_table_apply_specific(
PHP_INSPECTOR_ROOT_PENDING,
PHP_INSPECTOR_TABLE_FILE,
Expand Down
5 changes: 3 additions & 2 deletions src/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,12 @@ int php_inspector_file_resolve(zval *zv, zend_function *ops) {

if (function->function) {
php_inspector_breaks_purge(function->function);
php_inspector_instruction_cache_flush(zv, NULL);
}

function->function = ops;
function->expired = 0;

php_inspector_instruction_cache_flush(zv, NULL);

if (ZEND_USER_CODE(onResolve->type)) {
zval rv;
Expand All @@ -186,7 +188,6 @@ int php_inspector_file_resolve(zval *zv, zend_function *ops) {
}

function->expired = 1;
function->function = NULL;

return ZEND_HASH_APPLY_REMOVE;
}
Expand Down
3 changes: 2 additions & 1 deletion src/function.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,10 @@ int php_inspector_function_resolve(zval *zv, zend_function *ops) {

if (function->function) {
php_inspector_breaks_purge(function->function);
php_inspector_instruction_cache_flush(zv, NULL);
}

php_inspector_instruction_cache_flush(zv, NULL);

function->function = (zend_function*) php_inspector_map_create((zend_op_array*) ops);

if (ZEND_USER_CODE(onResolve->type)) {
Expand Down

0 comments on commit a41f9db

Please sign in to comment.