js/src/builtin/Eval.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     2  * vim: set ts=8 sts=4 et sw=4 tw=99:
     3  * This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #ifndef builtin_Eval_h
     8 #define builtin_Eval_h
    10 #include "jsbytecode.h"
    11 #include "NamespaceImports.h"
    13 namespace js {
    15 // The C++ native for 'eval' (ES5 15.1.2.1). The function is named "indirect
    16 // eval" because "direct eval" calls (as defined by the spec) will emit
    17 // JSOP_EVAL which in turn calls DirectEval. Thus, even though IndirectEval is
    18 // the callee function object for *all* calls to eval, it is by construction
    19 // only ever called in the case indirect eval.
    20 extern bool
    21 IndirectEval(JSContext *cx, unsigned argc, Value *vp);
    23 // Performs a direct eval for the given arguments, which must correspond to the
    24 // currently-executing stack frame, which must be a script frame. On completion
    25 // the result is returned in args.rval.
    26 extern bool
    27 DirectEval(JSContext *cx, const CallArgs &args);
    29 // Performs a direct eval called from Ion code.
    30 extern bool
    31 DirectEvalStringFromIon(JSContext *cx,
    32                         HandleObject scopeObj, HandleScript callerScript,
    33                         HandleValue thisValue, HandleString str,
    34                         jsbytecode * pc, MutableHandleValue vp);
    35 extern bool
    36 DirectEvalValueFromIon(JSContext *cx,
    37                        HandleObject scopeObj, HandleScript callerScript,
    38                        HandleValue thisValue, HandleValue evalArg,
    39                        jsbytecode * pc, MutableHandleValue vp);
    41 // True iff fun is a built-in eval function.
    42 extern bool
    43 IsAnyBuiltinEval(JSFunction *fun);
    45 }  // namespace js
    46 #endif /* builtin_Eval_h */

mercurial