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

Commit

Permalink
chakrashim: added missing Function methods
Browse files Browse the repository at this point in the history
  • Loading branch information
kfarnung authored and MSLaguana committed Sep 25, 2017
1 parent 3a11337 commit b871421
Show file tree
Hide file tree
Showing 2 changed files with 17 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 @@ -1810,11 +1810,13 @@ class V8_EXPORT Function : public Object {
Local<Value> GetName() const;

Local<Value> GetInferredName() const;
Local<Value> GetDebugName() const;

int GetScriptLineNumber() const;
int GetScriptColumnNumber() const;

int ScriptId() const;
Local<Value> GetBoundFunction() const;

static Function *Cast(Value *obj);
static const int kLineOffsetNotFound;
Expand Down Expand Up @@ -2396,7 +2398,10 @@ class V8_EXPORT MicrotasksScope {
enum GCType {
kGCTypeScavenge = 1 << 0,
kGCTypeMarkSweepCompact = 1 << 1,
kGCTypeAll = kGCTypeScavenge | kGCTypeMarkSweepCompact
kGCTypeIncrementalMarking = 1 << 2,
kGCTypeProcessWeakCallbacks = 1 << 3,
kGCTypeAll = kGCTypeScavenge | kGCTypeMarkSweepCompact |
kGCTypeIncrementalMarking | kGCTypeProcessWeakCallbacks
};

enum GCCallbackFlags {
Expand Down
11 changes: 11 additions & 0 deletions deps/chakrashim/src/v8function.cc
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ Local<Value> Function::GetInferredName() const {
return Local<Value>();
}

Local<Value> Function::GetDebugName() const {
// CHAKRA-TODO: Figure out what to do here
CHAKRA_ASSERT(false);
return Local<Value>();
}

const int Function::kLineOffsetNotFound = -1;

int Function::GetScriptLineNumber() const {
Expand All @@ -153,6 +159,11 @@ int Function::ScriptId() const {
return 0;
}

Local<Value> Function::GetBoundFunction() const {
CHAKRA_ASSERT(false);
return Local<Value>();
}

Function *Function::Cast(Value *obj) {
CHAKRA_ASSERT(obj->IsFunction());
return static_cast<Function*>(obj);
Expand Down

0 comments on commit b871421

Please sign in to comment.