jscript: Removed no longer needed ref counting in parser_ctx_t.
This commit is contained in:
parent
a1c4c84005
commit
a6ee63eef3
|
@ -43,8 +43,6 @@ typedef struct _func_stack {
|
|||
} func_stack_t;
|
||||
|
||||
typedef struct {
|
||||
LONG ref;
|
||||
|
||||
WCHAR *begin;
|
||||
const WCHAR *end;
|
||||
const WCHAR *ptr;
|
||||
|
@ -196,11 +194,6 @@ void parser_release(parser_ctx_t*) DECLSPEC_HIDDEN;
|
|||
|
||||
int parser_lex(void*,parser_ctx_t*) DECLSPEC_HIDDEN;
|
||||
|
||||
static inline void parser_addref(parser_ctx_t *ctx)
|
||||
{
|
||||
ctx->ref++;
|
||||
}
|
||||
|
||||
static inline void *parser_alloc(parser_ctx_t *ctx, DWORD size)
|
||||
{
|
||||
return jsheap_alloc(&ctx->heap, size);
|
||||
|
|
|
@ -1532,9 +1532,6 @@ static void program_parsed(parser_ctx_t *ctx, source_elements_t *source)
|
|||
|
||||
void parser_release(parser_ctx_t *ctx)
|
||||
{
|
||||
if(--ctx->ref)
|
||||
return;
|
||||
|
||||
script_release(ctx->script);
|
||||
heap_free(ctx->begin);
|
||||
jsheap_free(&ctx->heap);
|
||||
|
@ -1554,7 +1551,6 @@ HRESULT script_parse(script_ctx_t *ctx, const WCHAR *code, const WCHAR *delimite
|
|||
if(!parser_ctx)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
parser_ctx->ref = 1;
|
||||
parser_ctx->hres = JS_E_SYNTAX;
|
||||
parser_ctx->is_html = delimiter && !strcmpiW(delimiter, html_tagW);
|
||||
|
||||
|
|
Loading…
Reference in New Issue