Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
deps,test: fixing build break by adding unimplemented v8 functions
Browse files Browse the repository at this point in the history
We still don't support some of this functionality, so for now the
tests are disabled.
  • Loading branch information
MSLaguana authored and kfarnung committed Mar 7, 2018
1 parent c1c97d8 commit a8faf19
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
7 changes: 6 additions & 1 deletion deps/chakrashim/include/v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ class Global : public PersistentBase<T> {


template <class T>
class Eternal : private Persistent<T> {
class Eternal : protected Persistent<T> {
public:
Eternal() {}

Expand Down Expand Up @@ -802,6 +802,8 @@ class V8_EXPORT HandleScope {

static int NumberOfHandles(Isolate* isolate);

Isolate* GetIsolate() const;

private:
friend class EscapableHandleScope;
template <class T> friend class Local;
Expand Down Expand Up @@ -2955,6 +2957,9 @@ class V8_EXPORT Context {

Isolate* GetIsolate();

void Enter();
void Exit();

enum EmbedderDataFields { kDebugIdIndex = 0 };
void* GetAlignedPointerFromEmbedderData(int index);
void SetAlignedPointerInEmbedderData(int index, void* value);
Expand Down
10 changes: 10 additions & 0 deletions deps/chakrashim/src/v8context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,16 @@ Isolate* Context::GetIsolate() {
return Isolate::GetCurrent();
}

void Context::Enter() {
// CHAKRA-TODO - Figure out what to do here.
CHAKRA_UNIMPLEMENTED();
}

void Context::Exit() {
// CHAKRA-TODO - Figure out what to do here.
CHAKRA_UNIMPLEMENTED();
}

void* Context::GetAlignedPointerFromEmbedderData(int index) {
jsrt::ContextShim * contextShim =
jsrt::IsolateShim::GetCurrent()->GetContextShim((JsContextRef)this);
Expand Down
5 changes: 5 additions & 0 deletions deps/chakrashim/src/v8handlescope.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ HandleScope *HandleScope::GetCurrent() {
return current;
}

Isolate* HandleScope::GetIsolate() const {
return Isolate::GetCurrent();
}


bool HandleScope::AddLocal(JsValueRef value) {
// _locals is full, save them in _locals[0]
if (_count == kOnStackLocals) {
Expand Down
1 change: 1 addition & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,7 @@
],
'sources!': [
'test/cctest/test_environment.cc', # TODO: Enable these test for node-chakracore
'test/cctest/test_node_postmortem_metadata.cc',
],
'conditions': [
[ 'OS!="win" and chakracore_use_lto=="true"', {
Expand Down

0 comments on commit a8faf19

Please sign in to comment.