Opened 3 years ago

Closed 3 years ago

#5034 closed change (fixed)

Get rid of JsValuePtr and use JsValue instead

Reported by: sergz Assignee: hfiguiere
Priority: P4 Milestone:
Module: Libadblockplus Keywords:
Cc: fhd, hfiguiere Blocked By: #3589
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29416579
https://codereview.adblockplus.org/29416603
https://codereview.adblockplus.org/29417605
https://codereview.adblockplus.org/29417624

Description

Reasons

On practice it's visible that in most or even in all cases we don't need JsValuePtr, merely JsValue is enough, and the code can be still efficient because currently used compilers already support move-semantics. The code without addition wrapper (std::shared_ptr<JsValue>) should be simpler to use and less error-prone.

What to change

Gradually get rid of JsValuePtr.

Change History (9)

comment:1 Changed 3 years ago by sergz

I think next steps should be in commmits respectively

  • JsValue::NewCallback and JsEngine::SetProperty
  • JsEngine::NewValue

afterwards

  • JsEngine::NewObject

comment:2 Changed 3 years ago by hfiguiere

  • Owner set to hfiguiere

comment:3 Changed 3 years ago by hfiguiere

  • Review URL(s) modified (diff)

comment:4 Changed 3 years ago by hfiguiere

  • Status changed from new to reviewing

comment:6 Changed 3 years ago by hfiguiere

  • Review URL(s) modified (diff)

comment:7 Changed 3 years ago by hfiguiere

  • Review URL(s) modified (diff)

comment:9 Changed 3 years ago by hfiguiere

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.