Skip to content

Commit

Permalink
prepare 1.4.8 release
Browse files Browse the repository at this point in the history
  • Loading branch information
JerrySievert committed Apr 21, 2016
1 parent 07d09c0 commit 9b8def8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
3 changes: 3 additions & 0 deletions Changes
@@ -1,5 +1,8 @@
Revision history for plv8

1.4.8 2016-04-20
- better management of resources

1.4.4 2015-05-26
- Add jsonb type coercion in function boundary.
- Fix crash related to FLEXIBLE_ARRAY_MEMBER changes.
Expand Down
14 changes: 7 additions & 7 deletions META.json
Expand Up @@ -2,7 +2,7 @@
"name": "plv8",
"abstract": "A procedural language in JavaScript powered by V8",
"description": "plv8 is a trusted procedural language that is safe to use, fast to run and easy to develop.",
"version": "1.4.7",
"version": "1.4.8",
"maintainer": [
"Jerry Sievert <code@legitimatesounding.com>",
"Hitoshi Harada <umi.tanuki@gmail.com>"
Expand All @@ -24,21 +24,21 @@
},
"provides": {
"plv8": {
"file": "plv8--1.4.7.sql",
"file": "plv8--1.4.8.sql",
"docfile": "doc/plv8.md",
"version": "1.4.7",
"version": "1.4.8",
"abstract": "A procedural language in JavaScript"
},
"plcoffee": {
"file": "plcoffee--1.4.7.sql",
"file": "plcoffee--1.4.8.sql",
"docfile": "doc/plv8.md",
"version": "1.4.7",
"version": "1.4.8",
"abstract": "A procedural language in CoffeeScript"
},
"plls": {
"file": "plls--1.4.7.sql",
"file": "plls--1.4.8.sql",
"docfile": "doc/plv8.md",
"version": "1.4.7",
"version": "1.4.8",
"abstract": "A procedural language in LiveScript"
}
},
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -12,7 +12,7 @@
# 'make static' will download v8 and build, then statically link to it.
#
#-----------------------------------------------------------------------------#
PLV8_VERSION = 1.4.7
PLV8_VERSION = 1.4.8

PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
Expand Down
16 changes: 9 additions & 7 deletions plv8_func.cc
Expand Up @@ -113,6 +113,9 @@ SetCallback(Handle<ObjectTemplate> obj, const char *name,

class SubTranBlock
{
private:
ResourceOwner m_resowner;
MemoryContext m_mcontext;
public:
SubTranBlock();
void enter();
Expand All @@ -122,7 +125,6 @@ class SubTranBlock
Persistent<ObjectTemplate> PlanTemplate;
Persistent<ObjectTemplate> CursorTemplate;
Persistent<ObjectTemplate> WindowObjectTemplate;
ResourceOwner oldowner;


static Handle<v8::Value>
Expand Down Expand Up @@ -164,26 +166,26 @@ SubTranBlock::SubTranBlock()
void
SubTranBlock::enter()
{
oldowner = CurrentResourceOwner;

if (!IsTransactionOrTransactionBlock())
throw js_error("out of transaction");

BeginInternalSubTransaction(NULL);
m_resowner = CurrentResourceOwner;
m_mcontext = CurrentMemoryContext;

BeginInternalSubTransaction(NULL);
MemoryContextSwitchTo(m_mcontext);
}

void
SubTranBlock::exit(bool success)
{
CurrentResourceOwner = oldowner;

if (success)
ReleaseCurrentSubTransaction();
else
RollbackAndReleaseCurrentSubTransaction();


MemoryContextSwitchTo(m_mcontext);
CurrentResourceOwner = m_resowner;
}

JSONObject::JSONObject()
Expand Down

0 comments on commit 9b8def8

Please sign in to comment.