Sat, 03 Jan 2015 20:18:00 +0100
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.
michael@0 | 1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | .section ".text" |
michael@0 | 7 | .globl _NS_InvokeByIndex |
michael@0 | 8 | .type _NS_InvokeByIndex,@function |
michael@0 | 9 | |
michael@0 | 10 | /* |
michael@0 | 11 | * _NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, |
michael@0 | 12 | * uint32_t paramCount, nsXPTCVariant* params) |
michael@0 | 13 | */ |
michael@0 | 14 | |
michael@0 | 15 | _NS_InvokeByIndex: |
michael@0 | 16 | # set up frame |
michael@0 | 17 | stp x29, x30, [sp,#-32]! |
michael@0 | 18 | mov x29, sp |
michael@0 | 19 | stp x19, x20, [sp,#16] |
michael@0 | 20 | |
michael@0 | 21 | # save methodIndex across function calls |
michael@0 | 22 | mov w20, w1 |
michael@0 | 23 | |
michael@0 | 24 | # end of stack area passed to invoke_copy_to_stack |
michael@0 | 25 | mov x1, sp |
michael@0 | 26 | |
michael@0 | 27 | # assume 8 bytes of stack for each argument with 16-byte alignment |
michael@0 | 28 | add w19, w2, #1 |
michael@0 | 29 | and w19, w19, #0xfffffffe |
michael@0 | 30 | sub sp, sp, w19, uxth #3 |
michael@0 | 31 | |
michael@0 | 32 | # temporary place to store args passed in r0-r7,v0-v7 |
michael@0 | 33 | sub sp, sp, #128 |
michael@0 | 34 | |
michael@0 | 35 | # save 'that' on stack |
michael@0 | 36 | str x0, [sp] |
michael@0 | 37 | |
michael@0 | 38 | # start of stack area passed to invoke_copy_to_stack |
michael@0 | 39 | mov x0, sp |
michael@0 | 40 | bl invoke_copy_to_stack |
michael@0 | 41 | |
michael@0 | 42 | # load arguments passed in r0-r7 |
michael@0 | 43 | ldp x6, x7, [sp, #48] |
michael@0 | 44 | ldp x4, x5, [sp, #32] |
michael@0 | 45 | ldp x2, x3, [sp, #16] |
michael@0 | 46 | ldp x0, x1, [sp],#64 |
michael@0 | 47 | |
michael@0 | 48 | # load arguments passed in v0-v7 |
michael@0 | 49 | ldp d6, d7, [sp, #48] |
michael@0 | 50 | ldp d4, d5, [sp, #32] |
michael@0 | 51 | ldp d2, d3, [sp, #16] |
michael@0 | 52 | ldp d0, d1, [sp],#64 |
michael@0 | 53 | |
michael@0 | 54 | # call the method |
michael@0 | 55 | ldr x16, [x0] |
michael@0 | 56 | add x16, x16, w20, uxth #3 |
michael@0 | 57 | ldr x16, [x16] |
michael@0 | 58 | blr x16 |
michael@0 | 59 | |
michael@0 | 60 | add sp, sp, w19, uxth #3 |
michael@0 | 61 | ldp x19, x20, [sp,#16] |
michael@0 | 62 | ldp x29, x30, [sp],#32 |
michael@0 | 63 | ret |
michael@0 | 64 | |
michael@0 | 65 | .size _NS_InvokeByIndex, . - _NS_InvokeByIndex |
michael@0 | 66 | |
michael@0 | 67 |