Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(441)

Side by Side Diff: fxjse/fxjs_perisolatedata.cpp

Issue 2053043002: Untangle bad depdenency from fxjse/ to fpdfsdk/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@move_fxjse
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fxjse/DEPS ('k') | fxjse/include/fxjs_perisolatedata.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #include "fxjse/include/fxjs_perisolatedata.h"
8
9 static unsigned int g_embedderDataSlot = 1u;
10
11 // static
12 void FXJS_PerIsolateData::SetEmbedderDataSlot(unsigned int slot) {
13 g_embedderDataSlot = slot;
14 }
15
16 // static
17 unsigned int FXJS_PerIsolateData::EmbedderDataSlot() {
18 return g_embedderDataSlot;
19 }
20
21 // static
22 void FXJS_PerIsolateData::SetUp(v8::Isolate* pIsolate) {
23 if (!pIsolate->GetData(g_embedderDataSlot))
24 pIsolate->SetData(g_embedderDataSlot, new FXJS_PerIsolateData());
25 }
26
27 // static
28 FXJS_PerIsolateData* FXJS_PerIsolateData::Get(v8::Isolate* pIsolate) {
29 return static_cast<FXJS_PerIsolateData*>(
30 pIsolate->GetData(g_embedderDataSlot));
31 }
OLDNEW
« no previous file with comments | « fxjse/DEPS ('k') | fxjse/include/fxjs_perisolatedata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698