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: asm; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- |
michael@0 | 2 | * Version: MPL 1.1 |
michael@0 | 3 | * |
michael@0 | 4 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 7 | |
michael@0 | 8 | /* This code is for MIPS using the O32 ABI. */ |
michael@0 | 9 | |
michael@0 | 10 | #include <sys/regdef.h> |
michael@0 | 11 | #include <sys/asm.h> |
michael@0 | 12 | |
michael@0 | 13 | .text |
michael@0 | 14 | .globl PrepareAndDispatch |
michael@0 | 15 | |
michael@0 | 16 | NARGSAVE=4 # extra space for the callee to use. gccism |
michael@0 | 17 | # we can put our a0-a3 in our callers space. |
michael@0 | 18 | LOCALSZ=2 # gp, ra |
michael@0 | 19 | FRAMESZ=(((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK |
michael@0 | 20 | |
michael@0 | 21 | define(STUB_NAME, `Stub'$1`__14nsXPTCStubBase') |
michael@0 | 22 | |
michael@0 | 23 | define(STUB_ENTRY, |
michael@0 | 24 | ` .globl 'STUB_NAME($1)` |
michael@0 | 25 | .align 2 |
michael@0 | 26 | .type 'STUB_NAME($1)`,@function |
michael@0 | 27 | .ent 'STUB_NAME($1)`, 0 |
michael@0 | 28 | 'STUB_NAME($1)`: |
michael@0 | 29 | .frame sp, FRAMESZ, ra |
michael@0 | 30 | .set noreorder |
michael@0 | 31 | .cpload t9 |
michael@0 | 32 | .set reorder |
michael@0 | 33 | subu sp, FRAMESZ |
michael@0 | 34 | .cprestore 16 |
michael@0 | 35 | li t0, '$1` |
michael@0 | 36 | b sharedstub |
michael@0 | 37 | .end 'STUB_NAME($1)` |
michael@0 | 38 | |
michael@0 | 39 | ') |
michael@0 | 40 | |
michael@0 | 41 | define(SENTINEL_ENTRY, `') |
michael@0 | 42 | |
michael@0 | 43 | include(xptcstubsdef.inc) |
michael@0 | 44 | |
michael@0 | 45 | .globl sharedstub |
michael@0 | 46 | .ent sharedstub |
michael@0 | 47 | sharedstub: |
michael@0 | 48 | |
michael@0 | 49 | REG_S ra, 20(sp) |
michael@0 | 50 | |
michael@0 | 51 | REG_S a0, 24(sp) |
michael@0 | 52 | REG_S a1, 28(sp) |
michael@0 | 53 | REG_S a2, 32(sp) |
michael@0 | 54 | REG_S a3, 36(sp) |
michael@0 | 55 | |
michael@0 | 56 | # t0 is methodIndex |
michael@0 | 57 | move a1, t0 |
michael@0 | 58 | |
michael@0 | 59 | # put the start of a1, a2, a3, and stack |
michael@0 | 60 | move a2, sp |
michael@0 | 61 | addi a2, 24 # have a2 point to sp + 24 (where a0 is) |
michael@0 | 62 | |
michael@0 | 63 | # PrepareAndDispatch(that, methodIndex, args) |
michael@0 | 64 | # a0 a1 a2 |
michael@0 | 65 | # |
michael@0 | 66 | jal PrepareAndDispatch |
michael@0 | 67 | |
michael@0 | 68 | REG_L ra, 20(sp) |
michael@0 | 69 | REG_L a1, 28(sp) |
michael@0 | 70 | REG_L a2, 32(sp) |
michael@0 | 71 | |
michael@0 | 72 | addu sp, FRAMESZ |
michael@0 | 73 | j ra |
michael@0 | 74 | |
michael@0 | 75 | .end sharedstub |